{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/aura-historia-com/json-schema/aura-historia-com-own-partnership-application-data-schema.json",
  "title": "OwnPartnershipApplicationData",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/aura-historia-com-partnershipapplications-api-openapi.yml#/components/schemas/OwnPartnershipApplicationData",
  "type": "object",
  "required": [
    "id",
    "state",
    "proposal"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "state": {
      "$ref": "#/$defs/PartnershipApplicationStateData"
    },
    "proposal": {
      "$ref": "#/$defs/PartnershipApplicationProposalData"
    }
  },
  "$defs": {
    "ListingIngestionMethodData": {
      "type": "string",
      "enum": [
        "WEB_CRAWL",
        "SHOPIFY",
        "WOOCOMMERCE",
        "PARTNER_API"
      ]
    },
    "PartnershipApplicationProposalData": {
      "oneOf": [
        {
          "type": "object",
          "required": [
            "type",
            "listingSourceId"
          ],
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "EXISTING_LISTING_SOURCE"
              ]
            },
            "listingSourceId": {
              "type": "string"
            }
          }
        },
        {
          "type": "object",
          "required": [
            "type",
            "party",
            "listingSource"
          ],
          "properties": {
            "type": {
              "type": "string",
              "enum": [
                "PROPOSED_LISTING_SOURCE"
              ]
            },
            "party": {
              "$ref": "#/$defs/ProposedPartyData"
            },
            "listingSource": {
              "$ref": "#/$defs/ProposedListingSourceData"
            }
          }
        }
      ]
    },
    "PartnershipApplicationStateData": {
      "type": "string",
      "enum": [
        "SUBMITTED",
        "IN_REVIEW",
        "APPROVED",
        "REJECTED",
        "WITHDRAWN"
      ]
    },
    "ProposedListingSourceData": {
      "type": "object",
      "required": [
        "name",
        "requestedIngestionMethods"
      ],
      "properties": {
        "name": {
          "type": "string",
          "description": "ListingSource name. Outer Unicode whitespace is trimmed; blank values and values over 255 UTF-8 bytes are rejected."
        },
        "url": {
          "type": "string",
          "format": "uri"
        },
        "image": {
          "type": "string",
          "format": "uri"
        },
        "requestedIngestionMethods": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ListingIngestionMethodData"
          }
        }
      }
    },
    "ProposedPartyData": {
      "type": "object",
      "required": [
        "name"
      ],
      "properties": {
        "name": {
          "type": "string",
          "description": "Party name. Outer Unicode whitespace is trimmed; blank values and values over 255 UTF-8 bytes are rejected."
        },
        "phone": {
          "type": "string"
        },
        "email": {
          "type": "string",
          "format": "email"
        }
      }
    }
  }
}