{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/open-government-portugal/json-schema/open-government-portugal-pending-invitation-schema.json",
  "title": "PendingInvitation",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/open-government-portugal-me-api-openapi.yml#/components/schemas/PendingInvitation",
  "properties": {
    "assignments": {
      "description": "Objects to assign on acceptance (for partial_editor invitations)",
      "items": {
        "$ref": "#/$defs/GenericReference"
      },
      "type": "array"
    },
    "comment": {
      "description": "Invitation message",
      "type": "string"
    },
    "created": {
      "description": "The invitation creation date",
      "format": "date-time",
      "readOnly": true,
      "type": "string"
    },
    "id": {
      "readOnly": true,
      "type": "string"
    },
    "organization": {
      "$ref": "#/$defs/OrganizationReference"
    },
    "role": {
      "default": "editor",
      "description": "The role to assign",
      "enum": [
        "admin",
        "editor",
        "partial_editor"
      ],
      "type": "string"
    }
  },
  "type": "object",
  "$defs": {
    "Badge__read": {
      "properties": {
        "kind": {
          "type": "string"
        }
      },
      "required": [
        "kind"
      ],
      "type": "object"
    },
    "BaseReference": {
      "properties": {
        "class": {
          "description": "The object class",
          "type": "string"
        },
        "id": {
          "description": "The object unique identifier",
          "type": "string"
        }
      },
      "required": [
        "class",
        "id"
      ],
      "type": "object"
    },
    "GenericReference": {
      "properties": {
        "class": {
          "type": "string"
        },
        "id": {
          "type": "string"
        }
      },
      "type": "object"
    },
    "OrganizationPermissions": {
      "properties": {
        "delete": {
          "type": "boolean"
        },
        "edit": {
          "type": "boolean"
        },
        "harvest": {
          "type": "boolean"
        },
        "members": {
          "type": "boolean"
        },
        "private": {
          "type": "boolean"
        }
      },
      "type": "object"
    },
    "OrganizationReference": {
      "allOf": [
        {
          "$ref": "#/$defs/BaseReference"
        },
        {
          "properties": {
            "acronym": {
              "description": "The organization acronym",
              "type": "string"
            },
            "badges": {
              "description": "The organization badges",
              "items": {
                "$ref": "#/$defs/Badge__read"
              },
              "readOnly": true,
              "type": "array"
            },
            "logo": {
              "description": "The organization logo URL",
              "type": "string"
            },
            "logo_thumbnail": {
              "description": "The organization logo thumbnail URL. This is the square (100x100) and cropped version.",
              "type": "string"
            },
            "name": {
              "description": "The organization name",
              "readOnly": true,
              "type": "string"
            },
            "page": {
              "description": "The organization web page URL",
              "readOnly": true,
              "type": "string"
            },
            "permissions": {
              "allOf": [
                {
                  "$ref": "#/$defs/OrganizationPermissions"
                }
              ],
              "readOnly": true
            },
            "slug": {
              "description": "The organization string used as permalink",
              "readOnly": true,
              "type": "string"
            },
            "uri": {
              "description": "The API URI for this organization",
              "readOnly": true,
              "type": "string"
            }
          },
          "type": "object"
        }
      ]
    }
  }
}