{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rork/json-schema/rork-app-availability-v2-create-request-schema.json",
  "title": "AppAvailabilityV2CreateRequest",
  "x-generated": "2026-11-04",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rork-appavailabilities-api-openapi.yml#/components/schemas/AppAvailabilityV2CreateRequest",
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "appAvailabilities"
          ]
        },
        "attributes": {
          "type": "object",
          "properties": {
            "availableInNewTerritories": {
              "type": "boolean"
            }
          },
          "required": [
            "availableInNewTerritories"
          ]
        },
        "relationships": {
          "type": "object",
          "properties": {
            "app": {
              "type": "object",
              "properties": {
                "data": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "apps"
                      ]
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "type"
                  ]
                }
              },
              "required": [
                "data"
              ]
            },
            "territoryAvailabilities": {
              "type": "object",
              "properties": {
                "data": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "type": {
                        "type": "string",
                        "enum": [
                          "territoryAvailabilities"
                        ]
                      },
                      "id": {
                        "type": "string"
                      }
                    },
                    "required": [
                      "id",
                      "type"
                    ]
                  }
                }
              },
              "required": [
                "data"
              ]
            }
          },
          "required": [
            "app",
            "territoryAvailabilities"
          ]
        }
      },
      "required": [
        "relationships",
        "attributes",
        "type"
      ]
    },
    "included": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/TerritoryAvailabilityInlineCreate"
      }
    }
  },
  "required": [
    "data"
  ],
  "$defs": {
    "TerritoryAvailabilityInlineCreate": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "territoryAvailabilities"
          ]
        },
        "id": {
          "type": "string"
        },
        "attributes": {
          "type": "object",
          "properties": {
            "available": {
              "type": [
                "boolean",
                "null"
              ]
            },
            "releaseDate": {
              "type": [
                "string",
                "null"
              ],
              "format": "date"
            },
            "preOrderEnabled": {
              "type": [
                "boolean",
                "null"
              ]
            }
          }
        },
        "relationships": {
          "type": "object",
          "properties": {
            "territory": {
              "type": "object",
              "properties": {
                "data": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "territories"
                      ]
                    },
                    "id": {
                      "type": "string"
                    }
                  },
                  "required": [
                    "id",
                    "type"
                  ]
                }
              }
            }
          }
        }
      },
      "required": [
        "type"
      ]
    }
  }
}