{
  "$defs": {
    "ConnectorState": {
      "enum": [
        "provisioned",
        "healthy",
        "degraded",
        "revoked",
        "reconnected"
      ],
      "title": "ConnectorState",
      "type": "string"
    },
    "ReconnectStrategy": {
      "enum": [
        "automatic",
        "manual",
        "backoff"
      ],
      "title": "ReconnectStrategy",
      "type": "string"
    }
  },
  "$id": "spec-kitty-events/connector_reconnected_payload",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "description": "Payload for ConnectorReconnected events.",
  "properties": {
    "actor_id": {
      "minLength": 1,
      "title": "Actor Id",
      "type": "string"
    },
    "actor_type": {
      "pattern": "^(human|service|system)$",
      "title": "Actor Type",
      "type": "string"
    },
    "connector_id": {
      "minLength": 1,
      "title": "Connector Id",
      "type": "string"
    },
    "connector_type": {
      "minLength": 1,
      "title": "Connector Type",
      "type": "string"
    },
    "endpoint_url": {
      "format": "uri",
      "minLength": 1,
      "title": "Endpoint Url",
      "type": "string"
    },
    "mission_id": {
      "minLength": 1,
      "title": "Mission Id",
      "type": "string"
    },
    "previous_state": {
      "$ref": "#/$defs/ConnectorState"
    },
    "project_uuid": {
      "format": "uuid",
      "title": "Project Uuid",
      "type": "string"
    },
    "provider": {
      "minLength": 1,
      "title": "Provider",
      "type": "string"
    },
    "reconnect_strategy": {
      "$ref": "#/$defs/ReconnectStrategy"
    },
    "recorded_at": {
      "format": "date-time",
      "title": "Recorded At",
      "type": "string"
    },
    "user_id": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "title": "User Id"
    }
  },
  "required": [
    "connector_id",
    "connector_type",
    "provider",
    "mission_id",
    "project_uuid",
    "actor_id",
    "actor_type",
    "endpoint_url",
    "recorded_at",
    "previous_state",
    "reconnect_strategy"
  ],
  "title": "ConnectorReconnectedPayload",
  "type": "object"
}
