{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/passtru/json-schema/passtru-passtru-app-schema.json",
  "title": "PasstruApp",
  "x-generated": "2026-12-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/passtru-openapi.yml#/components/schemas/PasstruApp",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id",
    "object",
    "environment",
    "display_name",
    "status",
    "capabilities",
    "redirect_uris",
    "allowed_origins",
    "native_callback_schemes",
    "deep_link_domains",
    "webhook_subscriptions",
    "created_at",
    "updated_at",
    "credential_state",
    "audit_summary"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "object": {
      "const": "passtru_app"
    },
    "environment": {
      "$ref": "#/$defs/PublicEnvironment"
    },
    "display_name": {
      "type": "string"
    },
    "status": {
      "$ref": "#/$defs/PublicAppStatus"
    },
    "capabilities": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "redirect_uris": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "allowed_origins": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "native_callback_schemes": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "deep_link_domains": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "webhook_endpoint": {
      "type": [
        "string",
        "null"
      ]
    },
    "webhook_subscriptions": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "created_at": {
      "type": "string",
      "format": "date-time"
    },
    "updated_at": {
      "type": "string",
      "format": "date-time"
    },
    "created_by": {
      "type": [
        "string",
        "null"
      ]
    },
    "last_session_at": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "credential_state": {
      "$ref": "#/$defs/PublicCredentialState"
    },
    "audit_summary": {
      "$ref": "#/$defs/AuditSummary"
    }
  },
  "$defs": {
    "AuditSummary": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "created_by": {
          "type": [
            "string",
            "null"
          ]
        },
        "last_event": {
          "type": [
            "string",
            "null"
          ]
        },
        "last_event_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "idempotency_key": {
          "type": [
            "string",
            "null"
          ]
        },
        "request_digest": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "PublicAppStatus": {
      "enum": [
        "active",
        "suspended",
        "revoked"
      ]
    },
    "PublicCredentialState": {
      "enum": [
        "not_created",
        "ready",
        "revealed",
        "rotated",
        "expired",
        "locked"
      ]
    },
    "PublicEnvironment": {
      "enum": [
        "sandbox",
        "live"
      ]
    }
  }
}