{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://quickiso.app/data-portability/organization.schema.json",
  "title": "organization.json",
  "description": "The workspace's own record.",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string"
    },
    "region": {
      "type": "string",
      "enum": [
        "EU",
        "US"
      ]
    },
    "country": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "AT",
        "BE",
        "BG",
        "HR",
        "CY",
        "CZ",
        "DK",
        "EE",
        "FI",
        "FR",
        "DE",
        "GR",
        "HU",
        "IE",
        "IT",
        "LV",
        "LT",
        "LU",
        "MT",
        "NL",
        "PL",
        "PT",
        "RO",
        "SK",
        "SI",
        "ES",
        "SE",
        "US",
        null
      ]
    },
    "working_locale": {
      "type": "string",
      "enum": [
        "en",
        "pl"
      ]
    },
    "document_locale": {
      "type": "string",
      "enum": [
        "en",
        "pl"
      ]
    },
    "settings": {
      "type": [
        "object",
        "array",
        "string",
        "number",
        "boolean",
        "null"
      ]
    },
    "parent_organization_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "plan": {
      "type": "string",
      "enum": [
        "trial",
        "pilot",
        "start",
        "growth",
        "awareness",
        "scale",
        "partner",
        "internal"
      ]
    },
    "focus": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "training",
        null
      ]
    },
    "training_packages": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "state": {
      "type": "string",
      "enum": [
        "active",
        "read_only",
        "suspended"
      ]
    },
    "trial_ends_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
    },
    "plan_revision": {
      "type": "integer"
    },
    "onboarded_by": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "deletion_requested_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
    },
    "deletion_due_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
    },
    "deletion_requested_by": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "deletion_request_id": {
      "type": [
        "string",
        "null"
      ],
      "format": "uuid"
    },
    "storage_quota_bytes": {
      "type": [
        "integer",
        "null"
      ]
    },
    "trial_week_notice_for": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
    },
    "trial_day_notice_for": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
    },
    "billing_hold_since": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
    },
    "created_by": {
      "type": "string",
      "format": "uuid"
    },
    "created_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
    }
  },
  "required": [
    "id",
    "name",
    "region",
    "country",
    "working_locale",
    "document_locale",
    "settings",
    "parent_organization_id",
    "plan",
    "focus",
    "training_packages",
    "state",
    "trial_ends_at",
    "plan_revision",
    "onboarded_by",
    "deletion_requested_at",
    "deletion_due_at",
    "deletion_requested_by",
    "deletion_request_id",
    "storage_quota_bytes",
    "trial_week_notice_for",
    "trial_day_notice_for",
    "billing_hold_since",
    "created_by",
    "created_at",
    "updated_at"
  ],
  "additionalProperties": false
}
