{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/mindcloud/json-schema/mindcloud-connection-schema.json",
  "title": "Connection",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/mindcloud-connections-api-openapi.yml#/components/schemas/Connection",
  "type": "object",
  "properties": {
    "id": {
      "type": [
        "string",
        "null"
      ],
      "description": "Unique id of the connection."
    },
    "appId": {
      "type": [
        "string",
        "null"
      ],
      "description": "The app this connection signs into."
    },
    "status": {
      "type": [
        "string",
        "null"
      ],
      "description": "The connection's current status."
    },
    "isCompany": {
      "type": [
        "boolean",
        "null"
      ],
      "description": "True when the whole company shares this connection."
    },
    "endUserId": {
      "type": [
        "string",
        "null"
      ],
      "description": "The embedded end user who owns it, if any."
    },
    "installationId": {
      "type": [
        "string",
        "null"
      ],
      "description": "The embedded installation it belongs to, if any."
    },
    "userId": {
      "type": [
        "string",
        "null"
      ],
      "description": "The user who owns it, if it is personal."
    },
    "testedOn": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "The last successful test."
    },
    "expiresOn": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When the credential expires, if it does. Filter on this to catch expiring credentials early."
    },
    "authenticatedOn": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "The last time someone authenticated it."
    },
    "createdOn": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When the connection was created."
    },
    "createdBy": {
      "type": [
        "string",
        "null"
      ],
      "description": "Who created it."
    },
    "updatedOn": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "When it was last changed."
    }
  },
  "required": [
    "id",
    "appId",
    "status",
    "isCompany",
    "endUserId",
    "installationId",
    "userId",
    "testedOn",
    "expiresOn",
    "authenticatedOn",
    "createdOn",
    "createdBy",
    "updatedOn"
  ]
}