{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/scribe-mail-com/json-schema/scribe-mail-com-api-v1-installation-collection-response-schema.json",
  "title": "api_v1_installation_collection_response",
  "x-generated": "2026-11-24",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/scribe-mail-com-openapi.json#/components/schemas/api_v1_installation_collection_response",
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "enum": [
              "installation"
            ]
          },
          "attributes": {
            "type": "object",
            "properties": {
              "email": {
                "type": "object",
                "properties": {
                  "address": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "address"
                ]
              },
              "teammate": {
                "type": [
                  "object",
                  "null"
                ],
                "properties": {
                  "id": {
                    "type": "string"
                  },
                  "name": {
                    "type": [
                      "string",
                      "null"
                    ]
                  }
                },
                "required": [
                  "id"
                ]
              },
              "email_client": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "device_kind": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "status": {
                "type": "string",
                "enum": [
                  "installed",
                  "failed",
                  "pending",
                  "uninstalled"
                ]
              },
              "installation_count": {
                "type": [
                  "integer",
                  "null"
                ]
              },
              "first_installed_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "last_installed_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "last_failed_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "last_failed_error_code": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "email",
              "teammate",
              "status"
            ]
          }
        },
        "required": [
          "id",
          "type",
          "attributes"
        ]
      }
    },
    "meta": {
      "$ref": "#/$defs/api_v1_meta"
    }
  },
  "required": [
    "data",
    "meta"
  ],
  "$defs": {
    "api_v1_meta": {
      "type": "object",
      "properties": {
        "request_id": {
          "type": "string"
        }
      },
      "required": [
        "request_id"
      ],
      "additionalProperties": true
    }
  }
}