{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://appitool.appibara.com/buildtypes/ios/v1.schema.json",
  "title": "appitool iOS build type v1 parameters",
  "description": "Schema for buildDefinition.externalParameters and buildDefinition.internalParameters of SLSA provenance with buildType https://appitool.appibara.com/buildtypes/ios/v1. New optional fields may be added in v1.",
  "type": "object",
  "required": [
    "externalParameters",
    "internalParameters"
  ],
  "properties": {
    "externalParameters": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "command",
        "distribution",
        "bundleId",
        "scheme",
        "configuration",
        "source"
      ],
      "properties": {
        "command": {
          "const": "flow ios"
        },
        "distribution": {
          "type": "string",
          "enum": [
            "appstore",
            "adhoc",
            "development"
          ]
        },
        "bundleId": {
          "type": "string"
        },
        "scheme": {
          "type": "string"
        },
        "configuration": {
          "type": "string"
        },
        "source": {
          "type": "object",
          "required": [
            "repository"
          ],
          "additionalProperties": false,
          "properties": {
            "repository": {
              "type": "string",
              "format": "uri"
            },
            "ref": {
              "type": "string"
            }
          }
        }
      }
    },
    "internalParameters": {
      "type": "object",
      "additionalProperties": true,
      "required": [
        "version",
        "buildNumber",
        "exportMethod"
      ],
      "properties": {
        "version": {
          "type": "string"
        },
        "buildNumber": {
          "type": "string"
        },
        "exportMethod": {
          "type": "string",
          "enum": [
            "app-store-connect",
            "release-testing",
            "debugging"
          ]
        },
        "teamId": {
          "type": "string"
        },
        "xcodeVersion": {
          "type": "string"
        },
        "releaseTag": {
          "type": "string"
        }
      }
    }
  }
}
