{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://storeshot.art/schemas/cli/v1/pull.json",
  "title": "storeshot pull --json",
  "type": "object",
  "properties": {
    "schemaVersion": {
      "const": 1
    },
    "command": {
      "const": "pull"
    },
    "ok": {
      "type": "boolean"
    },
    "exitCode": {
      "type": "integer"
    },
    "data": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "kind": {
              "enum": [
                "generation",
                "screenshot_set"
              ]
            },
            "id": {
              "type": "string"
            },
            "folder": {
              "type": "string"
            },
            "layout": {
              "enum": [
                "store",
                "fastlane"
              ]
            },
            "files": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "path": {
                    "type": "string"
                  },
                  "relativePath": {
                    "type": "string"
                  },
                  "bytes": {
                    "type": "integer"
                  },
                  "sha256": {
                    "type": "string"
                  },
                  "store": {
                    "anyOf": [
                      {
                        "enum": [
                          "app_store",
                          "google_play"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "device": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "position": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "path",
                  "relativePath",
                  "bytes",
                  "sha256",
                  "store",
                  "device",
                  "position"
                ],
                "additionalProperties": false
              }
            },
            "complete": {
              "type": "boolean"
            },
            "missing": {
              "type": "array",
              "items": {
                "type": "object",
                "properties": {
                  "store": {
                    "anyOf": [
                      {
                        "enum": [
                          "app_store",
                          "google_play"
                        ]
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "device": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "position": {
                    "anyOf": [
                      {
                        "type": "integer"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  },
                  "status": {
                    "type": "string"
                  },
                  "errorCode": {
                    "anyOf": [
                      {
                        "type": "string"
                      },
                      {
                        "type": "null"
                      }
                    ]
                  }
                },
                "required": [
                  "store",
                  "device",
                  "position",
                  "status",
                  "errorCode"
                ],
                "additionalProperties": false
              }
            }
          },
          "required": [
            "kind",
            "id",
            "folder",
            "layout",
            "files",
            "complete",
            "missing"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    },
    "warnings": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "error": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "code": {
              "type": "string"
            },
            "message": {
              "type": "string"
            },
            "hint": {
              "type": "string"
            },
            "status": {
              "anyOf": [
                {
                  "type": "integer"
                },
                {
                  "type": "null"
                }
              ]
            },
            "requestId": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "docUrl": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ]
            },
            "retryAfterSeconds": {
              "anyOf": [
                {
                  "type": "number"
                },
                {
                  "type": "null"
                }
              ]
            },
            "details": {
              "type": "object"
            }
          },
          "required": [
            "code",
            "message",
            "hint",
            "status",
            "requestId",
            "docUrl",
            "retryAfterSeconds"
          ],
          "additionalProperties": false
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "schemaVersion",
    "command",
    "ok",
    "exitCode",
    "data",
    "warnings",
    "error"
  ],
  "additionalProperties": false
}
