{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://docs.elimi.africa/contracts/events/user.created.v1.json",
  "title": "user.created data",
  "description": "data payload for user.created (envelope wraps this). Emitted by Orchestrator after registration/OTP-verify. Consumers provision local users idempotently on userId.",
  "type": "object",
  "additionalProperties": false,
  "required": ["userId", "email", "intents"],
  "properties": {
    "userId": {
      "type": "string",
      "description": "Orchestrator User.id (ULID)"
    },
    "email": {
      "type": "string",
      "format": "email"
    },
    "intents": {
      "type": "array",
      "items": {
        "type": "string",
        "enum": ["cap", "lms", "workmasters"]
      },
      "description": "Platforms that should provision for this user"
    }
  }
}
