{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/daon/json-schema/daon-user-passcode-schema.json",
  "title": "UserPasscode",
  "description": "A user passcode record, contains passcode verification data and historical data. A user is allowed one current passcode per passcode policy.\n\n",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/daon-user-passcode-management-api-openapi.yml#/components/schemas/UserPasscode",
  "type": "object",
  "properties": {
    "permittedOperations": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "createdDtm": {
      "type": "string",
      "format": "date-time"
    },
    "lastUpdatedDtm": {
      "type": "string",
      "format": "date-time"
    },
    "id": {
      "type": "string",
      "description": "Unique 26-character database user ID."
    },
    "storeId": {
      "type": "string",
      "description": "Unique 26-character database store ID."
    },
    "userId": {
      "type": "string",
      "description": "Unique 26-character database user ID."
    },
    "status": {
      "type": "string",
      "description": "The passcode status: ACTIVE or DISABLED.",
      "enum": [
        "ACTIVE",
        "DISABLED"
      ]
    },
    "policyName": {
      "type": "string",
      "description": "The passcode policy name, used as a key to the passcode policies map in the store configuration."
    },
    "lastUsedDtm": {
      "type": "string",
      "format": "date-time",
      "description": "If the passcode has been used for authentication this field indicates the last time this occurred"
    },
    "lastRenewedDtm": {
      "type": "string",
      "format": "date-time",
      "description": "If the passcode has been renewed this field indicates the last time this occurred"
    },
    "expirationDate": {
      "type": "string",
      "format": "date",
      "description": "Expiration date for a passcode. Only required if regular renewals are enforced."
    },
    "typeId": {
      "type": "string"
    },
    "expired": {
      "type": "boolean"
    }
  },
  "required": [
    "id",
    "policyName",
    "status",
    "storeId",
    "userId"
  ]
}