{
  "openapi": "3.1.0",
  "info": {
    "title": "Themisure Integration API",
    "version": "1.0.0",
    "description": "The Themisure battery-intelligence integration (data-plane) API: the endpoints an EV-lending partner system calls to score battery packs, read a portfolio, run underwriting decisions, and verify battery-health certificates. Request and response shapes are the language-neutral boundary generated from the Zod contract in @themisure/api-contract; the Go gateway implements it. This document covers the integration surface only, not the interactive console, identity, or org-admin APIs.",
    "contact": {
      "name": "Themisure",
      "url": "https://themisure.com"
    }
  },
  "servers": [
    {
      "url": "https://gateway.themisure.com",
      "description": "Themisure production gateway (integration / data-plane API)."
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "tags": [
    {
      "name": "Public",
      "description": "Unauthenticated endpoints: platform status, liveness, and public certificate verification."
    },
    {
      "name": "Portfolio",
      "description": "Book-level reads across the caller's portfolio of battery packs."
    },
    {
      "name": "Packs",
      "description": "Per-pack reads and re-scoring, gated by tier entitlement and consent."
    },
    {
      "name": "Decisions",
      "description": "Ad-hoc, stateless decision lookups for an inline pack."
    },
    {
      "name": "Applications",
      "description": "Autonomous loan-application underwriting: submit, batch, list, and read the decision trace."
    },
    {
      "name": "Usage",
      "description": "Current-period usage against the tier quota (session-only)."
    },
    {
      "name": "Fleet",
      "description": "Self-serve fleet ingest and feature-drift (session-only)."
    },
    {
      "name": "Certificates",
      "description": "Verifiable battery-health certificate issuance and management (issuer surface is session-only)."
    }
  ],
  "paths": {
    "/v1/status": {
      "get": {
        "operationId": "getStatus",
        "summary": "Platform status",
        "description": "The public rollup of the gateway's internal uptime probes: per-component state, rolling uptime, latency, and the labeled availability objective. Unauthenticated; rate-limited per client IP. The uptime figures are computed from real probes, and a brand-new deploy reports an honest 'no data yet' rather than a fabricated 100 percent.",
        "tags": [
          "Public"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "The current platform status rollup.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/StatusPage"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests; retry after backing off (RATE_LIMITED).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/healthz": {
      "get": {
        "operationId": "getHealth",
        "summary": "Liveness probe",
        "description": "The public liveness probe. Reports that the gateway process is up without checking dependencies. Also served at /healthz for orchestrators.",
        "tags": [
          "Public"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "The process is up.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HealthStatus"
                }
              }
            }
          }
        }
      }
    },
    "/v1/certificates/{token}": {
      "get": {
        "operationId": "verifyCertificate",
        "summary": "Verify a battery-health certificate",
        "description": "The public, unauthenticated certificate verification. Looks a certificate up by its unguessable token alone and returns only the frozen public snapshot plus the computed status and timestamps, never any issuer-internal identifier. An unknown token is a uniform 404. The token's 256-bit entropy is the control; the endpoint is rate-limited per client IP as a modest anti-scraping guard.",
        "tags": [
          "Public"
        ],
        "security": [],
        "responses": {
          "200": {
            "description": "The public certificate snapshot, status, and timestamps.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CertificateVerification"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is outside the caller's entitled set (NOT_FOUND).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests; retry after backing off (RATE_LIMITED).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "description": "The certificate's public verification token.",
            "schema": {
              "type": "string",
              "maxLength": 512
            }
          }
        ]
      }
    },
    "/v1/portfolio/summary": {
      "get": {
        "operationId": "getPortfolioSummary",
        "summary": "Portfolio summary",
        "description": "Aggregate statistics for the caller's book. Only the book tiers (LENDER, INSURER, PLATFORM) have a book; the OWNER tier is structurally barred. Scoped to the caller's tenant.",
        "tags": [
          "Portfolio"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The book-level aggregate summary.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortfolioSummary"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials (UNAUTHORIZED).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/portfolio/packs": {
      "get": {
        "operationId": "listPortfolioPacks",
        "summary": "List portfolio packs",
        "description": "The paginated, filterable, sortable compact pack list for the caller's book, using keyset (cursor) pagination. Book-tier gated and tenant-scoped.",
        "tags": [
          "Portfolio"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "One page of compact pack rows plus the pagination envelope.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PackRowPage"
                }
              }
            }
          },
          "400": {
            "description": "The request was malformed (INVALID_PARAMETER).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials (UNAUTHORIZED).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "description": "Page size (keyset limit).",
            "schema": {
              "type": "integer",
              "minimum": 1
            }
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "description": "The keyset cursor from a prior page's nextCursor.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "segment",
            "in": "query",
            "required": false,
            "description": "Filter by vehicle segment.",
            "schema": {
              "type": "string",
              "enum": [
                "2W",
                "3W",
                "COMMERCIAL",
                "4W"
              ]
            }
          },
          {
            "name": "chemistry",
            "in": "query",
            "required": false,
            "description": "Filter by cell chemistry.",
            "schema": {
              "type": "string",
              "enum": [
                "LFP",
                "NMC"
              ]
            }
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "description": "Sort key for the page.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/portfolio/residual": {
      "get": {
        "operationId": "getPortfolioResidual",
        "summary": "Portfolio residual-value exposure",
        "description": "The book-level residual-value exposure roll-up: total residual exposure over time and by segment, aggregated from the latest stored score of every pack in the book (no re-scoring). Book-tier gated and tenant-scoped.",
        "tags": [
          "Portfolio"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The book-level residual exposure roll-up.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PortfolioResidualSummary"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials (UNAUTHORIZED).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/portfolio/abs-tape": {
      "get": {
        "operationId": "exportAbsDataTape",
        "summary": "Export the battery-aware ABS data tape",
        "description": "The battery-aware ABS / securitization data tape: a streamed zip attachment carrying the per-pack battery-collateral enrichment rows (battery-data-tape.csv), the pool roll-up (pool-summary.json), and a manifest (MANIFEST.txt) with the as-of, model versions, scope note, methodology pointer, and a per-file sha256. The tape supplies only battery columns; the issuer supplies the loan and borrower columns and joins by pack id / VIN. It is battery enrichment, not a credit tape and not a rating. With ?format=summary it returns the pool roll-up as JSON instead of the zip. Book-tier gated and tenant-scoped.",
        "tags": [
          "Portfolio"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The streamed zip data tape (or the JSON pool roll-up with ?format=summary).",
            "content": {
              "application/zip": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "400": {
            "description": "The request was malformed (INVALID_PARAMETER).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials (UNAUTHORIZED).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "format",
            "in": "query",
            "required": false,
            "description": "zip (default, the streamed download) or summary (the JSON pool roll-up).",
            "schema": {
              "type": "string",
              "enum": [
                "zip",
                "summary"
              ]
            }
          }
        ]
      }
    },
    "/v1/portfolio/abs-tape/summary": {
      "get": {
        "operationId": "getAbsDataTapeSummary",
        "summary": "ABS data tape pool summary",
        "description": "The battery-aware ABS data tape pool roll-up plus provenance, as JSON, so a client can render the headline stats without downloading the zip. The rows array is empty (the per-pack rows are the zip export's CSV only). Battery enrichment only, not a credit tape and not a rating. Book-tier gated and tenant-scoped.",
        "tags": [
          "Portfolio"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The pool roll-up and provenance (with an empty rows array).",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ABSDataTape"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials (UNAUTHORIZED).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/packs/{packId}": {
      "get": {
        "operationId": "getPack",
        "summary": "Get a pack's lifecycle record",
        "description": "The full lifecycle record for a stored pack: identity, latest score, residuals, flags, and the consent grants visible to the caller. Per-pack access applies: a pack outside the caller's entitled set is a 404, and a non-owner needs an active consent grant carrying read:record.",
        "tags": [
          "Packs"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The pack's full lifecycle record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LifecycleRecord"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials (UNAUTHORIZED).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is outside the caller's entitled set (NOT_FOUND).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "packId",
            "in": "path",
            "required": true,
            "description": "The 21-character Battery Pack Aadhaar id of the pack.",
            "schema": {
              "type": "string",
              "minLength": 21,
              "maxLength": 21
            }
          }
        ]
      }
    },
    "/v1/packs/{packId}/score": {
      "get": {
        "operationId": "getPackScore",
        "summary": "Get a pack's latest score",
        "description": "Only the latest score for a pack: the SoH band, reason codes, and the insurance-risk and health-grade lenses. Per-pack access with the read:score scope applies. A pack with no score is a 404.",
        "tags": [
          "Packs"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The pack's latest score.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ScoreResult"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials (UNAUTHORIZED).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is outside the caller's entitled set (NOT_FOUND).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "packId",
            "in": "path",
            "required": true,
            "description": "The 21-character Battery Pack Aadhaar id of the pack.",
            "schema": {
              "type": "string",
              "minLength": 21,
              "maxLength": 21
            }
          }
        ]
      }
    },
    "/v1/packs/{packId}/decision": {
      "get": {
        "operationId": "getPackDecision",
        "summary": "Get a pack's origination decision view",
        "description": "The origination-style decision projection for a stored pack at a selectable tenure: the residual at the nearest stored horizon, the latest score, the flags, and the gateway-derived LTV uplift with its full assumptions basis. A pure read; nothing is scored. Book-tier gated (the OWNER tier is barred) plus per-pack access.",
        "tags": [
          "Packs"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The decision projection at the requested tenure.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DecisionView"
                }
              }
            }
          },
          "400": {
            "description": "The request was malformed (INVALID_PARAMETER).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials (UNAUTHORIZED).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is outside the caller's entitled set (NOT_FOUND).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "packId",
            "in": "path",
            "required": true,
            "description": "The 21-character Battery Pack Aadhaar id of the pack.",
            "schema": {
              "type": "string",
              "minLength": 21,
              "maxLength": 21
            }
          },
          {
            "name": "tenureMonths",
            "in": "query",
            "required": false,
            "description": "The loan tenure in months to project the residual at (defaults to the nearest stored horizon).",
            "schema": {
              "type": "integer",
              "minimum": 0
            }
          }
        ]
      }
    },
    "/v1/packs/{packId}/consents": {
      "get": {
        "operationId": "listPackConsents",
        "summary": "List a pack's consent grants",
        "description": "The consent grants on a pack visible to the caller: an owner sees every grant on its own pack; a book tier sees only grants made to its own tier. Per-pack access with read:record applies.",
        "tags": [
          "Packs"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The consent grants visible to the caller.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ConsentGrant"
                  }
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials (UNAUTHORIZED).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is outside the caller's entitled set (NOT_FOUND).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "packId",
            "in": "path",
            "required": true,
            "description": "The 21-character Battery Pack Aadhaar id of the pack.",
            "schema": {
              "type": "string",
              "minLength": 21,
              "maxLength": 21
            }
          }
        ]
      }
    },
    "/v1/packs/{packId}/rescore": {
      "post": {
        "operationId": "rescorePack",
        "summary": "Re-score a pack",
        "description": "Triggers a fresh score for a stored pack and returns the updated lifecycle record. Requires the rescore scope on the matching consent grant in addition to tier entitlement. Idempotent under an Idempotency-Key header, and concurrent re-scores of the same pack are serialized. Book-tier gated (the OWNER tier is barred). A re-score consumes one billable score against the tier quota.",
        "tags": [
          "Packs"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The pack's updated lifecycle record.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/LifecycleRecord"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials (UNAUTHORIZED).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "The monthly score quota would be exceeded (QUOTA_EXCEEDED).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is outside the caller's entitled set (NOT_FOUND).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "An idempotency key was reused with a different body, or a re-score is already in flight (IDEMPOTENCY_CONFLICT).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "packId",
            "in": "path",
            "required": true,
            "description": "The 21-character Battery Pack Aadhaar id of the pack.",
            "schema": {
              "type": "string",
              "minLength": 21,
              "maxLength": 21
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "An idempotency key. A repeated re-score with the same key and body replays the stored record instead of producing a new score; a different body with the same key is a 409.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RescoreRequest"
              }
            }
          }
        }
      }
    },
    "/v1/decisions:lookup": {
      "post": {
        "operationId": "lookupDecision",
        "summary": "Ad-hoc decision lookup",
        "description": "Computes a decision view for an ad-hoc pack supplied inline (identity plus observations) at an optional tenure. Forwards the inline data to the scoring engine and shapes the result into a decision view. Nothing is persisted. Only the book tiers may call this; the OWNER tier is barred.",
        "tags": [
          "Decisions"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The decision projection for the inline pack.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DecisionView"
                }
              }
            }
          },
          "400": {
            "description": "The request was malformed (INVALID_PARAMETER).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials (UNAUTHORIZED).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The request body failed validation (UNPROCESSABLE_ENTITY).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DecisionLookupRequest"
              }
            }
          }
        }
      }
    },
    "/v1/applications": {
      "post": {
        "operationId": "submitApplication",
        "summary": "Submit a loan application",
        "description": "Submits an inbound loan application to the autonomous underwriter engine, persists the returned decision run against the caller's tenant, and returns the run's full decision trace (the rendered decision, the grounds it cites, and the replayable record). Book-tier gated; a scoped agent token is refused.",
        "tags": [
          "Applications"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The persisted decision run's full trace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DecisionTrace"
                }
              }
            }
          },
          "400": {
            "description": "The request was malformed (INVALID_PARAMETER).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials (UNAUTHORIZED).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The request body failed validation (UNPROCESSABLE_ENTITY).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "The autonomous underwriter engine is unavailable (UNDERWRITER_UNAVAILABLE).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LoanApplication"
              }
            }
          }
        }
      },
      "get": {
        "operationId": "listApplications",
        "summary": "List decided applications",
        "description": "The tenant's decided-application queue, newest first, bounded to a generous fixed limit. Book-tier gated, agent-refused, and tenant-scoped.",
        "tags": [
          "Applications"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The decided-application queue.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationListResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request was malformed (INVALID_PARAMETER).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials (UNAUTHORIZED).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "description": "Filter by decision status.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "product",
            "in": "query",
            "required": false,
            "description": "Filter by loan product.",
            "schema": {
              "type": "string",
              "enum": [
                "personal_loan",
                "auto_loan",
                "ev_loan"
              ]
            }
          }
        ]
      }
    },
    "/v1/applications:batch": {
      "post": {
        "operationId": "submitApplicationBatch",
        "summary": "Submit a batch of loan applications",
        "description": "Bulk application intake: a book of applications, each decided through the same path the single submit takes and persisted under the caller's tenant, with per-record {applicationId, error} failures rather than a batch-wide failure. Book-tier gated, agent-refused, and rate-limited per org.",
        "tags": [
          "Applications"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The batch outcome: counts plus per-record failures.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ApplicationBatchResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request was malformed (INVALID_PARAMETER).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials (UNAUTHORIZED).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The request body failed validation (UNPROCESSABLE_ENTITY).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests; retry after backing off (RATE_LIMITED).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "503": {
            "description": "The autonomous underwriter engine is unavailable (UNDERWRITER_UNAVAILABLE).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplicationBatchRequest"
              }
            }
          }
        }
      }
    },
    "/v1/application-batch-jobs": {
      "post": {
        "operationId": "submitBatchJob",
        "summary": "Submit an async batch job of loan applications",
        "description": "The ASYNC scale path beyond the synchronous, 500-capped batch: submit a larger book (up to 10000 applications) for background decisioning. Accepts a JSON body ({applications: [...]}) or a raw CSV body (Content-Type text/csv) with the flat columns applicationId, product, applicantId, displayName, state, requestedAmount, requestedTermMonths, status, submittedAt. Returns 202 with the created job id and a status URL to poll; each row is decided asynchronously through the SAME decision path the sync batch uses. Book-tier gated, agent-refused, and rate-limited per org.",
        "tags": [
          "Applications"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "202": {
            "description": "The created job's id, status (queued), row count, and status URL.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchJobSubmitResponse"
                }
              }
            }
          },
          "400": {
            "description": "The request was malformed (INVALID_PARAMETER).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials (UNAUTHORIZED).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests; retry after backing off (RATE_LIMITED).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BatchJobSubmitRequest"
              }
            }
          }
        }
      }
    },
    "/v1/application-batch-jobs/{id}": {
      "get": {
        "operationId": "getBatchJob",
        "summary": "Get an async batch job's status",
        "description": "One async batch job's status by id: its status (queued, running, succeeded, failed) and the running counts (total, processed, succeeded, failed). Book-tier gated, agent-refused, and org-scoped; a foreign id is a uniform 404.",
        "tags": [
          "Applications"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The batch job's status and counts.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatchJob"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials (UNAUTHORIZED).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is outside the caller's entitled set (NOT_FOUND).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The batch job id.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/application-batch-jobs/{id}/results": {
      "get": {
        "operationId": "getBatchJobResults",
        "summary": "Download an async batch job's results CSV",
        "description": "One async batch job's per-row results as a streamed CSV attachment: one row per submitted application in submission order, carrying its id, row index, status (succeeded, failed, or pending while the job is still running), the decided outcome and decision id on success, or the per-row error. Book-tier gated, agent-refused, and org-scoped; a foreign id is a uniform 404.",
        "tags": [
          "Applications"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The streamed per-row results CSV.",
            "content": {
              "text/csv": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials (UNAUTHORIZED).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is outside the caller's entitled set (NOT_FOUND).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The batch job id.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/applications/{applicationId}": {
      "get": {
        "operationId": "getApplication",
        "summary": "Get one application's decision trace",
        "description": "One application's full decision trace by id: the rendered decision, the grounds, each agent's pulled facts, and the replayable record. Book-tier gated, agent-refused, and tenant-scoped; a foreign id is a uniform 404.",
        "tags": [
          "Applications"
        ],
        "security": [
          {
            "bearerAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The application's full decision trace.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DecisionTrace"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials (UNAUTHORIZED).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is outside the caller's entitled set (NOT_FOUND).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "applicationId",
            "in": "path",
            "required": true,
            "description": "The application id.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/v1/usage": {
      "get": {
        "operationId": "getUsage",
        "summary": "Current-period usage",
        "description": "The caller's current-period usage against its tier quota. Read-only and tenant-scoped. SESSION-ONLY: this endpoint requires an interactive console session (cookie) and is not callable with an API key (any org member may read it via the console). Documented here for completeness; not part of the programmatic SDK.",
        "tags": [
          "Usage"
        ],
        "security": [
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The current period's usage against the tier quota.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/UsageView"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials (UNAUTHORIZED).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/fleet/ingest": {
      "post": {
        "operationId": "ingestFleet",
        "summary": "Ingest a fleet",
        "description": "Uploads the caller's own fleet telemetry (inline identity plus observable history per pack) to be scored and added to the caller's book, with per-record failures. SESSION-ONLY: ingesting a book is an admin console action; it requires a session (an API-key principal carries no org role) and is not callable with an API key. Documented for completeness; not part of the programmatic SDK.",
        "tags": [
          "Fleet"
        ],
        "security": [
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The ingest outcome: counts plus per-record failures.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/FleetIngestResult"
                }
              }
            }
          },
          "400": {
            "description": "The request was malformed (INVALID_PARAMETER).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials (UNAUTHORIZED).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "402": {
            "description": "The monthly score quota would be exceeded (QUOTA_EXCEEDED).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "429": {
            "description": "Too many requests; retry after backing off (RATE_LIMITED).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FleetIngestRequest"
              }
            }
          }
        }
      }
    },
    "/v1/fleet/drift": {
      "get": {
        "operationId": "getFleetDrift",
        "summary": "Latest feature-drift snapshot",
        "description": "The latest feature-drift snapshot for the caller's tenant, computed best-effort on each ingest. SESSION-ONLY: session-admin gated against the acting org; not callable with an API key. Documented for completeness; not part of the programmatic SDK.",
        "tags": [
          "Fleet"
        ],
        "security": [
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The latest feature-drift snapshot.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DriftSnapshot"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials (UNAUTHORIZED).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is outside the caller's entitled set (NOT_FOUND).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        }
      }
    },
    "/v1/packs/{packId}/certificates": {
      "post": {
        "operationId": "issueCertificate",
        "summary": "Issue a battery-health certificate",
        "description": "Issues a verifiable certificate for a pack by freezing its current graded score into a public snapshot. SESSION-ONLY: a certificate records its issuing org and user, so it requires a session (an API-key principal has neither); book-tier plus per-pack read:score access also apply. Documented for completeness; not part of the programmatic SDK.",
        "tags": [
          "Certificates"
        ],
        "security": [
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "201": {
            "description": "The issued certificate, including its public verify path.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatteryCertificate"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials (UNAUTHORIZED).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is outside the caller's entitled set (NOT_FOUND).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "422": {
            "description": "The request body failed validation (UNPROCESSABLE_ENTITY).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "packId",
            "in": "path",
            "required": true,
            "description": "The 21-character Battery Pack Aadhaar id of the pack.",
            "schema": {
              "type": "string",
              "minLength": 21,
              "maxLength": 21
            }
          }
        ]
      },
      "get": {
        "operationId": "listCertificates",
        "summary": "List a pack's certificates",
        "description": "Lists a pack's certificates for the caller's org, newest first. SESSION-ONLY, gated exactly like the issue path and scoped to the acting org. Documented for completeness; not part of the programmatic SDK.",
        "tags": [
          "Certificates"
        ],
        "security": [
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The pack's certificates for the caller's org.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CertificateList"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials (UNAUTHORIZED).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is outside the caller's entitled set (NOT_FOUND).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "packId",
            "in": "path",
            "required": true,
            "description": "The 21-character Battery Pack Aadhaar id of the pack.",
            "schema": {
              "type": "string",
              "minLength": 21,
              "maxLength": 21
            }
          }
        ]
      }
    },
    "/v1/certificates/{id}/revoke": {
      "post": {
        "operationId": "revokeCertificate",
        "summary": "Revoke a certificate",
        "description": "Revokes a certificate the caller's org issued, recording an optional reason for the issuer's own audit (never exposed on the public verify). SESSION-ONLY and issuer-org admin gated; a foreign id is a 404. Documented for completeness; not part of the programmatic SDK.",
        "tags": [
          "Certificates"
        ],
        "security": [
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The revoked certificate.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BatteryCertificate"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials (UNAUTHORIZED).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is outside the caller's entitled set (NOT_FOUND).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "409": {
            "description": "An idempotency key was reused with a different body, or a re-score is already in flight (IDEMPOTENCY_CONFLICT).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The certificate id.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RevokeRequest"
              }
            }
          }
        }
      }
    },
    "/v1/certificates/{id}/document": {
      "get": {
        "operationId": "getCertificateDocument",
        "summary": "Download a certificate document",
        "description": "Serves the self-contained, print-ready HTML certificate for one certificate the caller's org owns, as a downloadable attachment. SESSION-ONLY and issuer-org scoped; a foreign id is a 404. Documented for completeness; not part of the programmatic SDK.",
        "tags": [
          "Certificates"
        ],
        "security": [
          {
            "cookieAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "The print-ready HTML certificate document.",
            "content": {
              "text/html": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid credentials (UNAUTHORIZED).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "403": {
            "description": "The caller's tier is not permitted (TIER_FORBIDDEN), or an active consent grant is required (CONSENT_REQUIRED), or the caller lacks the required org role (FORBIDDEN).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          },
          "404": {
            "description": "No such resource, or it is outside the caller's entitled set (NOT_FOUND).",
            "content": {
              "application/problem+json": {
                "schema": {
                  "$ref": "#/components/schemas/Problem"
                }
              }
            }
          }
        },
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "description": "The certificate id.",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "Pack": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "packId": {
            "type": "string",
            "pattern": "^[0-9A-Z]{21}$"
          },
          "chemistry": {
            "type": "string",
            "enum": [
              "LFP",
              "NMC"
            ]
          },
          "segment": {
            "type": "string",
            "enum": [
              "2W",
              "3W",
              "COMMERCIAL",
              "4W"
            ]
          },
          "make": {
            "type": "string",
            "minLength": 1
          },
          "model": {
            "type": "string",
            "minLength": 1
          },
          "ratedCapacityKwh": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "commissionedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "region": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "packId",
          "chemistry",
          "segment",
          "make",
          "model",
          "ratedCapacityKwh",
          "commissionedAt",
          "region"
        ],
        "additionalProperties": false
      },
      "ReasonCode": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "feature": {
            "type": "string",
            "minLength": 1
          },
          "label": {
            "type": "string",
            "minLength": 1
          },
          "direction": {
            "type": "string",
            "enum": [
              "lowers",
              "raises"
            ]
          },
          "contribution": {
            "type": "number"
          }
        },
        "required": [
          "feature",
          "label",
          "direction",
          "contribution"
        ],
        "additionalProperties": false
      },
      "InsuranceRisk": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "tier": {
            "type": "string",
            "enum": [
              "low",
              "moderate",
              "elevated",
              "high"
            ]
          },
          "riskScore": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "rationale": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "basis": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "tier",
          "riskScore",
          "rationale",
          "basis"
        ],
        "additionalProperties": false
      },
      "HealthGrade": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "grade": {
            "type": "string",
            "enum": [
              "A",
              "B",
              "C",
              "D",
              "F"
            ]
          },
          "healthScore": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "confidence": {
            "type": "string",
            "enum": [
              "high",
              "medium",
              "low"
            ]
          },
          "headline": {
            "type": "string",
            "minLength": 1
          },
          "basis": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "grade",
          "healthScore",
          "confidence",
          "headline",
          "basis"
        ],
        "additionalProperties": false
      },
      "BehaviorDriver": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "fast_charge",
              "depth_of_discharge",
              "thermal_exposure"
            ]
          },
          "label": {
            "type": "string",
            "minLength": 1
          },
          "observedValue": {
            "type": "number"
          },
          "subScore": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "rationale": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "kind",
          "label",
          "observedValue",
          "subScore",
          "rationale"
        ],
        "additionalProperties": false
      },
      "BehaviorRisk": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "score": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "tier": {
            "type": "string",
            "enum": [
              "low",
              "moderate",
              "elevated",
              "high"
            ]
          },
          "components": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "kind": {
                  "type": "string",
                  "enum": [
                    "fast_charge",
                    "depth_of_discharge",
                    "thermal_exposure"
                  ]
                },
                "label": {
                  "type": "string",
                  "minLength": 1
                },
                "observedValue": {
                  "type": "number"
                },
                "subScore": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                },
                "rationale": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "kind",
                "label",
                "observedValue",
                "subScore",
                "rationale"
              ],
              "additionalProperties": false
            }
          },
          "assumptions": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "basis": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "score",
          "tier",
          "components",
          "assumptions",
          "basis"
        ],
        "additionalProperties": false
      },
      "SecondLifeValuation": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "automotiveEndMonths": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "automotiveEndAgeYears": {
            "type": "number",
            "minimum": 0
          },
          "residualCapacityPct": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "residualCapacityBand": {
            "type": "object",
            "properties": {
              "p10": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "p50": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "p90": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              }
            },
            "required": [
              "p10",
              "p50",
              "p90"
            ],
            "additionalProperties": false
          },
          "indicativeValueInr": {
            "type": "number",
            "minimum": 0
          },
          "valueBand": {
            "type": "object",
            "properties": {
              "p10": {
                "type": "number",
                "minimum": 0
              },
              "p50": {
                "type": "number",
                "minimum": 0
              },
              "p90": {
                "type": "number",
                "minimum": 0
              }
            },
            "required": [
              "p10",
              "p50",
              "p90"
            ],
            "additionalProperties": false
          },
          "grade": {
            "type": "string",
            "enum": [
              "repurpose",
              "marginal",
              "recycle"
            ]
          },
          "assumptions": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "basis": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "automotiveEndMonths",
          "automotiveEndAgeYears",
          "residualCapacityPct",
          "residualCapacityBand",
          "indicativeValueInr",
          "valueBand",
          "grade",
          "assumptions",
          "basis"
        ],
        "additionalProperties": false
      },
      "WarrantyLossCost": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "warrantyTermMonths": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "warrantySohThresholdPct": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "breachProbability": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "remedyCostInr": {
            "type": "number",
            "minimum": 0
          },
          "expectedLossCostInr": {
            "type": "number",
            "minimum": 0
          },
          "reserveInr": {
            "type": "number",
            "minimum": 0
          },
          "horizonLimited": {
            "type": "boolean"
          },
          "reserveCurve": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "monthsFromNow": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "cumulativeBreachProbability": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                "reserveInr": {
                  "type": "number",
                  "minimum": 0
                }
              },
              "required": [
                "monthsFromNow",
                "cumulativeBreachProbability",
                "reserveInr"
              ],
              "additionalProperties": false
            }
          },
          "assumptions": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "basis": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "warrantyTermMonths",
          "warrantySohThresholdPct",
          "breachProbability",
          "remedyCostInr",
          "expectedLossCostInr",
          "reserveInr",
          "horizonLimited",
          "reserveCurve",
          "assumptions",
          "basis"
        ],
        "additionalProperties": false
      },
      "ScoreResult": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "packId": {
            "type": "string",
            "pattern": "^[0-9A-Z]{21}$"
          },
          "sohPercent": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "sohBand": {
            "type": "object",
            "properties": {
              "p10": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "p50": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "p90": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              }
            },
            "required": [
              "p10",
              "p50",
              "p90"
            ],
            "additionalProperties": false
          },
          "reasonCodes": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "feature": {
                  "type": "string",
                  "minLength": 1
                },
                "label": {
                  "type": "string",
                  "minLength": 1
                },
                "direction": {
                  "type": "string",
                  "enum": [
                    "lowers",
                    "raises"
                  ]
                },
                "contribution": {
                  "type": "number"
                }
              },
              "required": [
                "feature",
                "label",
                "direction",
                "contribution"
              ],
              "additionalProperties": false
            }
          },
          "insuranceRisk": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "tier": {
                    "type": "string",
                    "enum": [
                      "low",
                      "moderate",
                      "elevated",
                      "high"
                    ]
                  },
                  "riskScore": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "rationale": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "basis": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "tier",
                  "riskScore",
                  "rationale",
                  "basis"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "healthGrade": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "grade": {
                    "type": "string",
                    "enum": [
                      "A",
                      "B",
                      "C",
                      "D",
                      "F"
                    ]
                  },
                  "healthScore": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "confidence": {
                    "type": "string",
                    "enum": [
                      "high",
                      "medium",
                      "low"
                    ]
                  },
                  "headline": {
                    "type": "string",
                    "minLength": 1
                  },
                  "basis": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "grade",
                  "healthScore",
                  "confidence",
                  "headline",
                  "basis"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "behaviorRisk": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "score": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "tier": {
                    "type": "string",
                    "enum": [
                      "low",
                      "moderate",
                      "elevated",
                      "high"
                    ]
                  },
                  "components": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "enum": [
                            "fast_charge",
                            "depth_of_discharge",
                            "thermal_exposure"
                          ]
                        },
                        "label": {
                          "type": "string",
                          "minLength": 1
                        },
                        "observedValue": {
                          "type": "number"
                        },
                        "subScore": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "rationale": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "kind",
                        "label",
                        "observedValue",
                        "subScore",
                        "rationale"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "assumptions": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "basis": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "score",
                  "tier",
                  "components",
                  "assumptions",
                  "basis"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "secondLife": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "automotiveEndMonths": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "automotiveEndAgeYears": {
                    "type": "number",
                    "minimum": 0
                  },
                  "residualCapacityPct": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "residualCapacityBand": {
                    "type": "object",
                    "properties": {
                      "p10": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100
                      },
                      "p50": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100
                      },
                      "p90": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100
                      }
                    },
                    "required": [
                      "p10",
                      "p50",
                      "p90"
                    ],
                    "additionalProperties": false
                  },
                  "indicativeValueInr": {
                    "type": "number",
                    "minimum": 0
                  },
                  "valueBand": {
                    "type": "object",
                    "properties": {
                      "p10": {
                        "type": "number",
                        "minimum": 0
                      },
                      "p50": {
                        "type": "number",
                        "minimum": 0
                      },
                      "p90": {
                        "type": "number",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "p10",
                      "p50",
                      "p90"
                    ],
                    "additionalProperties": false
                  },
                  "grade": {
                    "type": "string",
                    "enum": [
                      "repurpose",
                      "marginal",
                      "recycle"
                    ]
                  },
                  "assumptions": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "basis": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "automotiveEndMonths",
                  "automotiveEndAgeYears",
                  "residualCapacityPct",
                  "residualCapacityBand",
                  "indicativeValueInr",
                  "valueBand",
                  "grade",
                  "assumptions",
                  "basis"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "warrantyLossCost": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "warrantyTermMonths": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "warrantySohThresholdPct": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "breachProbability": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "remedyCostInr": {
                    "type": "number",
                    "minimum": 0
                  },
                  "expectedLossCostInr": {
                    "type": "number",
                    "minimum": 0
                  },
                  "reserveInr": {
                    "type": "number",
                    "minimum": 0
                  },
                  "horizonLimited": {
                    "type": "boolean"
                  },
                  "reserveCurve": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "monthsFromNow": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "cumulativeBreachProbability": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1
                        },
                        "reserveInr": {
                          "type": "number",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "monthsFromNow",
                        "cumulativeBreachProbability",
                        "reserveInr"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "assumptions": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "basis": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "warrantyTermMonths",
                  "warrantySohThresholdPct",
                  "breachProbability",
                  "remedyCostInr",
                  "expectedLossCostInr",
                  "reserveInr",
                  "horizonLimited",
                  "reserveCurve",
                  "assumptions",
                  "basis"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "computedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "modelVersion": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "packId",
          "sohPercent",
          "sohBand",
          "reasonCodes",
          "insuranceRisk",
          "healthGrade",
          "behaviorRisk",
          "secondLife",
          "warrantyLossCost",
          "computedAt",
          "modelVersion"
        ],
        "additionalProperties": false
      },
      "DegradationPoint": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "monthsFromNow": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "sohPercent": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "band": {
            "type": "object",
            "properties": {
              "p10": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "p50": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "p90": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              }
            },
            "required": [
              "p10",
              "p50",
              "p90"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "monthsFromNow",
          "sohPercent",
          "band"
        ],
        "additionalProperties": false
      },
      "DegradationCurve": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "packId": {
            "type": "string",
            "pattern": "^[0-9A-Z]{21}$"
          },
          "points": {
            "minItems": 2,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "monthsFromNow": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "sohPercent": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                },
                "band": {
                  "type": "object",
                  "properties": {
                    "p10": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "p50": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "p90": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100
                    }
                  },
                  "required": [
                    "p10",
                    "p50",
                    "p90"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "monthsFromNow",
                "sohPercent",
                "band"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "packId",
          "points"
        ],
        "additionalProperties": false
      },
      "ResidualEstimate": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "packId": {
            "type": "string",
            "pattern": "^[0-9A-Z]{21}$"
          },
          "horizonMonths": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "residualValueInr": {
            "type": "number",
            "minimum": 0
          },
          "band": {
            "type": "object",
            "properties": {
              "p10": {
                "type": "number",
                "minimum": 0
              },
              "p50": {
                "type": "number",
                "minimum": 0
              },
              "p90": {
                "type": "number",
                "minimum": 0
              }
            },
            "required": [
              "p10",
              "p50",
              "p90"
            ],
            "additionalProperties": false
          },
          "assumptions": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          }
        },
        "required": [
          "packId",
          "horizonMonths",
          "residualValueInr",
          "band",
          "assumptions"
        ],
        "additionalProperties": false
      },
      "RiskFlag": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "packId": {
            "type": "string",
            "pattern": "^[0-9A-Z]{21}$"
          },
          "kind": {
            "type": "string",
            "enum": [
              "THERMAL_ABUSE",
              "FAST_CHARGE_INTENSITY",
              "DEEP_CYCLING",
              "CALENDAR_AGING"
            ]
          },
          "severity": {
            "type": "string",
            "enum": [
              "LOW",
              "MEDIUM",
              "HIGH"
            ]
          },
          "evidence": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "packId",
          "kind",
          "severity",
          "evidence"
        ],
        "additionalProperties": false
      },
      "ConsentGrant": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "packId": {
            "type": "string",
            "pattern": "^[0-9A-Z]{21}$"
          },
          "grantedTo": {
            "type": "string",
            "enum": [
              "LENDER",
              "INSURER",
              "PLATFORM",
              "OWNER"
            ]
          },
          "grantedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "expiresAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "scopes": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          }
        },
        "required": [
          "packId",
          "grantedTo",
          "grantedAt",
          "expiresAt",
          "scopes"
        ],
        "additionalProperties": false
      },
      "LifecycleRecord": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "packId": {
            "type": "string",
            "pattern": "^[0-9A-Z]{21}$"
          },
          "pack": {
            "type": "object",
            "properties": {
              "packId": {
                "type": "string",
                "pattern": "^[0-9A-Z]{21}$"
              },
              "chemistry": {
                "type": "string",
                "enum": [
                  "LFP",
                  "NMC"
                ]
              },
              "segment": {
                "type": "string",
                "enum": [
                  "2W",
                  "3W",
                  "COMMERCIAL",
                  "4W"
                ]
              },
              "make": {
                "type": "string",
                "minLength": 1
              },
              "model": {
                "type": "string",
                "minLength": 1
              },
              "ratedCapacityKwh": {
                "type": "number",
                "exclusiveMinimum": 0
              },
              "commissionedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "region": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "packId",
              "chemistry",
              "segment",
              "make",
              "model",
              "ratedCapacityKwh",
              "commissionedAt",
              "region"
            ],
            "additionalProperties": false
          },
          "latestScore": {
            "type": "object",
            "properties": {
              "packId": {
                "type": "string",
                "pattern": "^[0-9A-Z]{21}$"
              },
              "sohPercent": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "sohBand": {
                "type": "object",
                "properties": {
                  "p10": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "p50": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "p90": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  }
                },
                "required": [
                  "p10",
                  "p50",
                  "p90"
                ],
                "additionalProperties": false
              },
              "reasonCodes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "feature": {
                      "type": "string",
                      "minLength": 1
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1
                    },
                    "direction": {
                      "type": "string",
                      "enum": [
                        "lowers",
                        "raises"
                      ]
                    },
                    "contribution": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "feature",
                    "label",
                    "direction",
                    "contribution"
                  ],
                  "additionalProperties": false
                }
              },
              "insuranceRisk": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "tier": {
                        "type": "string",
                        "enum": [
                          "low",
                          "moderate",
                          "elevated",
                          "high"
                        ]
                      },
                      "riskScore": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100
                      },
                      "rationale": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "basis": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "tier",
                      "riskScore",
                      "rationale",
                      "basis"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "healthGrade": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "grade": {
                        "type": "string",
                        "enum": [
                          "A",
                          "B",
                          "C",
                          "D",
                          "F"
                        ]
                      },
                      "healthScore": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100
                      },
                      "confidence": {
                        "type": "string",
                        "enum": [
                          "high",
                          "medium",
                          "low"
                        ]
                      },
                      "headline": {
                        "type": "string",
                        "minLength": 1
                      },
                      "basis": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "grade",
                      "healthScore",
                      "confidence",
                      "headline",
                      "basis"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "behaviorRisk": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "score": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100
                      },
                      "tier": {
                        "type": "string",
                        "enum": [
                          "low",
                          "moderate",
                          "elevated",
                          "high"
                        ]
                      },
                      "components": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "fast_charge",
                                "depth_of_discharge",
                                "thermal_exposure"
                              ]
                            },
                            "label": {
                              "type": "string",
                              "minLength": 1
                            },
                            "observedValue": {
                              "type": "number"
                            },
                            "subScore": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 100
                            },
                            "rationale": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "kind",
                            "label",
                            "observedValue",
                            "subScore",
                            "rationale"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "assumptions": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "basis": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "score",
                      "tier",
                      "components",
                      "assumptions",
                      "basis"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "secondLife": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "automotiveEndMonths": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "automotiveEndAgeYears": {
                        "type": "number",
                        "minimum": 0
                      },
                      "residualCapacityPct": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100
                      },
                      "residualCapacityBand": {
                        "type": "object",
                        "properties": {
                          "p10": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 100
                          },
                          "p50": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 100
                          },
                          "p90": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 100
                          }
                        },
                        "required": [
                          "p10",
                          "p50",
                          "p90"
                        ],
                        "additionalProperties": false
                      },
                      "indicativeValueInr": {
                        "type": "number",
                        "minimum": 0
                      },
                      "valueBand": {
                        "type": "object",
                        "properties": {
                          "p10": {
                            "type": "number",
                            "minimum": 0
                          },
                          "p50": {
                            "type": "number",
                            "minimum": 0
                          },
                          "p90": {
                            "type": "number",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "p10",
                          "p50",
                          "p90"
                        ],
                        "additionalProperties": false
                      },
                      "grade": {
                        "type": "string",
                        "enum": [
                          "repurpose",
                          "marginal",
                          "recycle"
                        ]
                      },
                      "assumptions": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "basis": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "automotiveEndMonths",
                      "automotiveEndAgeYears",
                      "residualCapacityPct",
                      "residualCapacityBand",
                      "indicativeValueInr",
                      "valueBand",
                      "grade",
                      "assumptions",
                      "basis"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "warrantyLossCost": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "warrantyTermMonths": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "warrantySohThresholdPct": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100
                      },
                      "breachProbability": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      },
                      "remedyCostInr": {
                        "type": "number",
                        "minimum": 0
                      },
                      "expectedLossCostInr": {
                        "type": "number",
                        "minimum": 0
                      },
                      "reserveInr": {
                        "type": "number",
                        "minimum": 0
                      },
                      "horizonLimited": {
                        "type": "boolean"
                      },
                      "reserveCurve": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "monthsFromNow": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "cumulativeBreachProbability": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1
                            },
                            "reserveInr": {
                              "type": "number",
                              "minimum": 0
                            }
                          },
                          "required": [
                            "monthsFromNow",
                            "cumulativeBreachProbability",
                            "reserveInr"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "assumptions": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "basis": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "warrantyTermMonths",
                      "warrantySohThresholdPct",
                      "breachProbability",
                      "remedyCostInr",
                      "expectedLossCostInr",
                      "reserveInr",
                      "horizonLimited",
                      "reserveCurve",
                      "assumptions",
                      "basis"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "computedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "modelVersion": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "packId",
              "sohPercent",
              "sohBand",
              "reasonCodes",
              "insuranceRisk",
              "healthGrade",
              "behaviorRisk",
              "secondLife",
              "warrantyLossCost",
              "computedAt",
              "modelVersion"
            ],
            "additionalProperties": false
          },
          "scoreHistory": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "packId": {
                  "type": "string",
                  "pattern": "^[0-9A-Z]{21}$"
                },
                "sohPercent": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 100
                },
                "sohBand": {
                  "type": "object",
                  "properties": {
                    "p10": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "p50": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "p90": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100
                    }
                  },
                  "required": [
                    "p10",
                    "p50",
                    "p90"
                  ],
                  "additionalProperties": false
                },
                "reasonCodes": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "feature": {
                        "type": "string",
                        "minLength": 1
                      },
                      "label": {
                        "type": "string",
                        "minLength": 1
                      },
                      "direction": {
                        "type": "string",
                        "enum": [
                          "lowers",
                          "raises"
                        ]
                      },
                      "contribution": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "feature",
                      "label",
                      "direction",
                      "contribution"
                    ],
                    "additionalProperties": false
                  }
                },
                "insuranceRisk": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "tier": {
                          "type": "string",
                          "enum": [
                            "low",
                            "moderate",
                            "elevated",
                            "high"
                          ]
                        },
                        "riskScore": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "rationale": {
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "basis": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "tier",
                        "riskScore",
                        "rationale",
                        "basis"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "healthGrade": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "grade": {
                          "type": "string",
                          "enum": [
                            "A",
                            "B",
                            "C",
                            "D",
                            "F"
                          ]
                        },
                        "healthScore": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "confidence": {
                          "type": "string",
                          "enum": [
                            "high",
                            "medium",
                            "low"
                          ]
                        },
                        "headline": {
                          "type": "string",
                          "minLength": 1
                        },
                        "basis": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "grade",
                        "healthScore",
                        "confidence",
                        "headline",
                        "basis"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "behaviorRisk": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "score": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "tier": {
                          "type": "string",
                          "enum": [
                            "low",
                            "moderate",
                            "elevated",
                            "high"
                          ]
                        },
                        "components": {
                          "minItems": 1,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "kind": {
                                "type": "string",
                                "enum": [
                                  "fast_charge",
                                  "depth_of_discharge",
                                  "thermal_exposure"
                                ]
                              },
                              "label": {
                                "type": "string",
                                "minLength": 1
                              },
                              "observedValue": {
                                "type": "number"
                              },
                              "subScore": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 100
                              },
                              "rationale": {
                                "type": "string",
                                "minLength": 1
                              }
                            },
                            "required": [
                              "kind",
                              "label",
                              "observedValue",
                              "subScore",
                              "rationale"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "assumptions": {
                          "minItems": 1,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "basis": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "score",
                        "tier",
                        "components",
                        "assumptions",
                        "basis"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "secondLife": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "automotiveEndMonths": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "automotiveEndAgeYears": {
                          "type": "number",
                          "minimum": 0
                        },
                        "residualCapacityPct": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "residualCapacityBand": {
                          "type": "object",
                          "properties": {
                            "p10": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 100
                            },
                            "p50": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 100
                            },
                            "p90": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 100
                            }
                          },
                          "required": [
                            "p10",
                            "p50",
                            "p90"
                          ],
                          "additionalProperties": false
                        },
                        "indicativeValueInr": {
                          "type": "number",
                          "minimum": 0
                        },
                        "valueBand": {
                          "type": "object",
                          "properties": {
                            "p10": {
                              "type": "number",
                              "minimum": 0
                            },
                            "p50": {
                              "type": "number",
                              "minimum": 0
                            },
                            "p90": {
                              "type": "number",
                              "minimum": 0
                            }
                          },
                          "required": [
                            "p10",
                            "p50",
                            "p90"
                          ],
                          "additionalProperties": false
                        },
                        "grade": {
                          "type": "string",
                          "enum": [
                            "repurpose",
                            "marginal",
                            "recycle"
                          ]
                        },
                        "assumptions": {
                          "minItems": 1,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "basis": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "automotiveEndMonths",
                        "automotiveEndAgeYears",
                        "residualCapacityPct",
                        "residualCapacityBand",
                        "indicativeValueInr",
                        "valueBand",
                        "grade",
                        "assumptions",
                        "basis"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "warrantyLossCost": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "warrantyTermMonths": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "warrantySohThresholdPct": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "breachProbability": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1
                        },
                        "remedyCostInr": {
                          "type": "number",
                          "minimum": 0
                        },
                        "expectedLossCostInr": {
                          "type": "number",
                          "minimum": 0
                        },
                        "reserveInr": {
                          "type": "number",
                          "minimum": 0
                        },
                        "horizonLimited": {
                          "type": "boolean"
                        },
                        "reserveCurve": {
                          "minItems": 1,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "monthsFromNow": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "cumulativeBreachProbability": {
                                "type": "number",
                                "minimum": 0,
                                "maximum": 1
                              },
                              "reserveInr": {
                                "type": "number",
                                "minimum": 0
                              }
                            },
                            "required": [
                              "monthsFromNow",
                              "cumulativeBreachProbability",
                              "reserveInr"
                            ],
                            "additionalProperties": false
                          }
                        },
                        "assumptions": {
                          "minItems": 1,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "minLength": 1
                          }
                        },
                        "basis": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "required": [
                        "warrantyTermMonths",
                        "warrantySohThresholdPct",
                        "breachProbability",
                        "remedyCostInr",
                        "expectedLossCostInr",
                        "reserveInr",
                        "horizonLimited",
                        "reserveCurve",
                        "assumptions",
                        "basis"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "computedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "modelVersion": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "packId",
                "sohPercent",
                "sohBand",
                "reasonCodes",
                "insuranceRisk",
                "healthGrade",
                "behaviorRisk",
                "secondLife",
                "warrantyLossCost",
                "computedAt",
                "modelVersion"
              ],
              "additionalProperties": false
            }
          },
          "degradation": {
            "type": "object",
            "properties": {
              "packId": {
                "type": "string",
                "pattern": "^[0-9A-Z]{21}$"
              },
              "points": {
                "minItems": 2,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "monthsFromNow": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "sohPercent": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "band": {
                      "type": "object",
                      "properties": {
                        "p10": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "p50": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "p90": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        }
                      },
                      "required": [
                        "p10",
                        "p50",
                        "p90"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "monthsFromNow",
                    "sohPercent",
                    "band"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "packId",
              "points"
            ],
            "additionalProperties": false
          },
          "residuals": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "packId": {
                  "type": "string",
                  "pattern": "^[0-9A-Z]{21}$"
                },
                "horizonMonths": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "residualValueInr": {
                  "type": "number",
                  "minimum": 0
                },
                "band": {
                  "type": "object",
                  "properties": {
                    "p10": {
                      "type": "number",
                      "minimum": 0
                    },
                    "p50": {
                      "type": "number",
                      "minimum": 0
                    },
                    "p90": {
                      "type": "number",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "p10",
                    "p50",
                    "p90"
                  ],
                  "additionalProperties": false
                },
                "assumptions": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              },
              "required": [
                "packId",
                "horizonMonths",
                "residualValueInr",
                "band",
                "assumptions"
              ],
              "additionalProperties": false
            }
          },
          "flags": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "packId": {
                  "type": "string",
                  "pattern": "^[0-9A-Z]{21}$"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "THERMAL_ABUSE",
                    "FAST_CHARGE_INTENSITY",
                    "DEEP_CYCLING",
                    "CALENDAR_AGING"
                  ]
                },
                "severity": {
                  "type": "string",
                  "enum": [
                    "LOW",
                    "MEDIUM",
                    "HIGH"
                  ]
                },
                "evidence": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "packId",
                "kind",
                "severity",
                "evidence"
              ],
              "additionalProperties": false
            }
          },
          "consents": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "packId": {
                  "type": "string",
                  "pattern": "^[0-9A-Z]{21}$"
                },
                "grantedTo": {
                  "type": "string",
                  "enum": [
                    "LENDER",
                    "INSURER",
                    "PLATFORM",
                    "OWNER"
                  ]
                },
                "grantedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "expiresAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "scopes": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1
                  }
                }
              },
              "required": [
                "packId",
                "grantedTo",
                "grantedAt",
                "expiresAt",
                "scopes"
              ],
              "additionalProperties": false
            }
          },
          "updatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          }
        },
        "required": [
          "packId",
          "pack",
          "latestScore",
          "scoreHistory",
          "degradation",
          "residuals",
          "flags",
          "consents",
          "updatedAt"
        ],
        "additionalProperties": false
      },
      "PortfolioSummary": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "lenderId": {
            "type": "string",
            "minLength": 1
          },
          "packCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "medianSohPercent": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "valueAtRiskInr": {
            "type": "number",
            "minimum": 0
          },
          "flaggedPackCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "sohDistribution": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "bucket": {
                  "type": "string",
                  "minLength": 1
                },
                "count": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "bucket",
                "count"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "lenderId",
          "packCount",
          "medianSohPercent",
          "valueAtRiskInr",
          "flaggedPackCount",
          "sohDistribution"
        ],
        "additionalProperties": false
      },
      "PortfolioResidualHorizon": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "horizonMonths": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "packCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "totalP10Inr": {
            "type": "number",
            "minimum": 0
          },
          "totalP50Inr": {
            "type": "number",
            "minimum": 0
          },
          "totalP90Inr": {
            "type": "number",
            "minimum": 0
          }
        },
        "required": [
          "horizonMonths",
          "packCount",
          "totalP10Inr",
          "totalP50Inr",
          "totalP90Inr"
        ],
        "additionalProperties": false
      },
      "PortfolioResidualSegmentHorizon": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "horizonMonths": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "totalP50Inr": {
            "type": "number",
            "minimum": 0
          }
        },
        "required": [
          "horizonMonths",
          "totalP50Inr"
        ],
        "additionalProperties": false
      },
      "PortfolioResidualSegment": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "segment": {
            "type": "string",
            "enum": [
              "2W",
              "3W",
              "COMMERCIAL",
              "4W"
            ]
          },
          "packCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "horizons": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "horizonMonths": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "totalP50Inr": {
                  "type": "number",
                  "minimum": 0
                }
              },
              "required": [
                "horizonMonths",
                "totalP50Inr"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "segment",
          "packCount",
          "horizons"
        ],
        "additionalProperties": false
      },
      "PortfolioResidualSummary": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "lenderId": {
            "type": "string",
            "minLength": 1
          },
          "asOf": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "packsWithResiduals": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "packsWithoutResiduals": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "horizons": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "horizonMonths": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "packCount": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "totalP10Inr": {
                  "type": "number",
                  "minimum": 0
                },
                "totalP50Inr": {
                  "type": "number",
                  "minimum": 0
                },
                "totalP90Inr": {
                  "type": "number",
                  "minimum": 0
                }
              },
              "required": [
                "horizonMonths",
                "packCount",
                "totalP10Inr",
                "totalP50Inr",
                "totalP90Inr"
              ],
              "additionalProperties": false
            }
          },
          "bySegment": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "segment": {
                  "type": "string",
                  "enum": [
                    "2W",
                    "3W",
                    "COMMERCIAL",
                    "4W"
                  ]
                },
                "packCount": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "horizons": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "horizonMonths": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "totalP50Inr": {
                        "type": "number",
                        "minimum": 0
                      }
                    },
                    "required": [
                      "horizonMonths",
                      "totalP50Inr"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "segment",
                "packCount",
                "horizons"
              ],
              "additionalProperties": false
            }
          },
          "assumptions": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          }
        },
        "required": [
          "lenderId",
          "asOf",
          "packsWithResiduals",
          "packsWithoutResiduals",
          "horizons",
          "bySegment",
          "assumptions"
        ],
        "additionalProperties": false
      },
      "ABSTapeRow": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "packId": {
            "type": "string",
            "pattern": "^[0-9A-Z]{21}$"
          },
          "chemistry": {
            "type": "string",
            "enum": [
              "LFP",
              "NMC"
            ]
          },
          "segment": {
            "type": "string",
            "enum": [
              "2W",
              "3W",
              "COMMERCIAL",
              "4W"
            ]
          },
          "make": {
            "type": "string",
            "minLength": 1
          },
          "model": {
            "type": "string",
            "minLength": 1
          },
          "ratedCapacityKwh": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "commissionedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "ageMonths": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "sohBand": {
            "type": "object",
            "properties": {
              "p10": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "p50": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "p90": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              }
            },
            "required": [
              "p10",
              "p50",
              "p90"
            ],
            "additionalProperties": false
          },
          "healthGrade": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "A",
                  "B",
                  "C",
                  "D",
                  "F"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "insuranceRiskTier": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "low",
                  "moderate",
                  "elevated",
                  "high"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "behaviorTier": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "low",
                  "moderate",
                  "elevated",
                  "high"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "secondLifeGrade": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "repurpose",
                  "marginal",
                  "recycle"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "warrantyBreachProbability": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "maturityHorizonMonths": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "residualAtMaturityInr": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "residualAtMaturityBand": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "p10": {
                    "type": "number",
                    "minimum": 0
                  },
                  "p50": {
                    "type": "number",
                    "minimum": 0
                  },
                  "p90": {
                    "type": "number",
                    "minimum": 0
                  }
                },
                "required": [
                  "p10",
                  "p50",
                  "p90"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "degradationSlopePctPerYear": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "modelVersion": {
            "type": "string",
            "minLength": 1
          },
          "computedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          }
        },
        "required": [
          "packId",
          "chemistry",
          "segment",
          "make",
          "model",
          "ratedCapacityKwh",
          "commissionedAt",
          "ageMonths",
          "sohBand",
          "healthGrade",
          "insuranceRiskTier",
          "behaviorTier",
          "secondLifeGrade",
          "warrantyBreachProbability",
          "maturityHorizonMonths",
          "residualAtMaturityInr",
          "residualAtMaturityBand",
          "degradationSlopePctPerYear",
          "modelVersion",
          "computedAt"
        ],
        "additionalProperties": false
      },
      "ABSTapeGradeCount": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "grade": {
            "type": "string",
            "minLength": 1
          },
          "count": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "grade",
          "count"
        ],
        "additionalProperties": false
      },
      "ABSTapeMixCount": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "minLength": 1
          },
          "count": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "label",
          "count"
        ],
        "additionalProperties": false
      },
      "ABSTapePoolSummary": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "lenderId": {
            "type": "string",
            "minLength": 1
          },
          "asOf": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "packCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "packsWithoutScore": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "weightedAvgSohP50": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "healthGradeDistribution": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "grade": {
                  "type": "string",
                  "minLength": 1
                },
                "count": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "grade",
                "count"
              ],
              "additionalProperties": false
            }
          },
          "totalResidualAtMaturityInr": {
            "type": "number",
            "minimum": 0
          },
          "totalResidualAtMaturityBand": {
            "type": "object",
            "properties": {
              "p10": {
                "type": "number",
                "minimum": 0
              },
              "p50": {
                "type": "number",
                "minimum": 0
              },
              "p90": {
                "type": "number",
                "minimum": 0
              }
            },
            "required": [
              "p10",
              "p50",
              "p90"
            ],
            "additionalProperties": false
          },
          "packsWithResidualAtMaturity": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "avgDegradationSlopePctPerYear": {
            "type": "number"
          },
          "packsWithDegradationSlope": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "chemistryMix": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "minLength": 1
                },
                "count": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "label",
                "count"
              ],
              "additionalProperties": false
            }
          },
          "segmentMix": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "label": {
                  "type": "string",
                  "minLength": 1
                },
                "count": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                }
              },
              "required": [
                "label",
                "count"
              ],
              "additionalProperties": false
            }
          },
          "assumptions": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          }
        },
        "required": [
          "lenderId",
          "asOf",
          "packCount",
          "packsWithoutScore",
          "weightedAvgSohP50",
          "healthGradeDistribution",
          "totalResidualAtMaturityInr",
          "totalResidualAtMaturityBand",
          "packsWithResidualAtMaturity",
          "avgDegradationSlopePctPerYear",
          "packsWithDegradationSlope",
          "chemistryMix",
          "segmentMix",
          "assumptions"
        ],
        "additionalProperties": false
      },
      "ABSTapeProvenance": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "asOf": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "modelVersions": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "methodologyUrl": {
            "type": "string",
            "minLength": 1
          },
          "scopeNote": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "asOf",
          "modelVersions",
          "methodologyUrl",
          "scopeNote"
        ],
        "additionalProperties": false
      },
      "ABSDataTape": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "rows": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "packId": {
                  "type": "string",
                  "pattern": "^[0-9A-Z]{21}$"
                },
                "chemistry": {
                  "type": "string",
                  "enum": [
                    "LFP",
                    "NMC"
                  ]
                },
                "segment": {
                  "type": "string",
                  "enum": [
                    "2W",
                    "3W",
                    "COMMERCIAL",
                    "4W"
                  ]
                },
                "make": {
                  "type": "string",
                  "minLength": 1
                },
                "model": {
                  "type": "string",
                  "minLength": 1
                },
                "ratedCapacityKwh": {
                  "type": "number",
                  "exclusiveMinimum": 0
                },
                "commissionedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "ageMonths": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "sohBand": {
                  "type": "object",
                  "properties": {
                    "p10": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "p50": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "p90": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100
                    }
                  },
                  "required": [
                    "p10",
                    "p50",
                    "p90"
                  ],
                  "additionalProperties": false
                },
                "healthGrade": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "A",
                        "B",
                        "C",
                        "D",
                        "F"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "insuranceRiskTier": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "low",
                        "moderate",
                        "elevated",
                        "high"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "behaviorTier": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "low",
                        "moderate",
                        "elevated",
                        "high"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "secondLifeGrade": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "repurpose",
                        "marginal",
                        "recycle"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "warrantyBreachProbability": {
                  "anyOf": [
                    {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "maturityHorizonMonths": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "residualAtMaturityInr": {
                  "anyOf": [
                    {
                      "type": "number",
                      "minimum": 0
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "residualAtMaturityBand": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "p10": {
                          "type": "number",
                          "minimum": 0
                        },
                        "p50": {
                          "type": "number",
                          "minimum": 0
                        },
                        "p90": {
                          "type": "number",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "p10",
                        "p50",
                        "p90"
                      ],
                      "additionalProperties": false
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "degradationSlopePctPerYear": {
                  "anyOf": [
                    {
                      "type": "number"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "modelVersion": {
                  "type": "string",
                  "minLength": 1
                },
                "computedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                }
              },
              "required": [
                "packId",
                "chemistry",
                "segment",
                "make",
                "model",
                "ratedCapacityKwh",
                "commissionedAt",
                "ageMonths",
                "sohBand",
                "healthGrade",
                "insuranceRiskTier",
                "behaviorTier",
                "secondLifeGrade",
                "warrantyBreachProbability",
                "maturityHorizonMonths",
                "residualAtMaturityInr",
                "residualAtMaturityBand",
                "degradationSlopePctPerYear",
                "modelVersion",
                "computedAt"
              ],
              "additionalProperties": false
            }
          },
          "summary": {
            "type": "object",
            "properties": {
              "lenderId": {
                "type": "string",
                "minLength": 1
              },
              "asOf": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "packCount": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "packsWithoutScore": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "weightedAvgSohP50": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "healthGradeDistribution": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "grade": {
                      "type": "string",
                      "minLength": 1
                    },
                    "count": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "grade",
                    "count"
                  ],
                  "additionalProperties": false
                }
              },
              "totalResidualAtMaturityInr": {
                "type": "number",
                "minimum": 0
              },
              "totalResidualAtMaturityBand": {
                "type": "object",
                "properties": {
                  "p10": {
                    "type": "number",
                    "minimum": 0
                  },
                  "p50": {
                    "type": "number",
                    "minimum": 0
                  },
                  "p90": {
                    "type": "number",
                    "minimum": 0
                  }
                },
                "required": [
                  "p10",
                  "p50",
                  "p90"
                ],
                "additionalProperties": false
              },
              "packsWithResidualAtMaturity": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "avgDegradationSlopePctPerYear": {
                "type": "number"
              },
              "packsWithDegradationSlope": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "chemistryMix": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "label": {
                      "type": "string",
                      "minLength": 1
                    },
                    "count": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "label",
                    "count"
                  ],
                  "additionalProperties": false
                }
              },
              "segmentMix": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "label": {
                      "type": "string",
                      "minLength": 1
                    },
                    "count": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "label",
                    "count"
                  ],
                  "additionalProperties": false
                }
              },
              "assumptions": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              }
            },
            "required": [
              "lenderId",
              "asOf",
              "packCount",
              "packsWithoutScore",
              "weightedAvgSohP50",
              "healthGradeDistribution",
              "totalResidualAtMaturityInr",
              "totalResidualAtMaturityBand",
              "packsWithResidualAtMaturity",
              "avgDegradationSlopePctPerYear",
              "packsWithDegradationSlope",
              "chemistryMix",
              "segmentMix",
              "assumptions"
            ],
            "additionalProperties": false
          },
          "provenance": {
            "type": "object",
            "properties": {
              "asOf": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "modelVersions": {
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "methodologyUrl": {
                "type": "string",
                "minLength": 1
              },
              "scopeNote": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "asOf",
              "modelVersions",
              "methodologyUrl",
              "scopeNote"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "rows",
          "summary",
          "provenance"
        ],
        "additionalProperties": false
      },
      "SessionUser": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "email": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "suspended"
            ]
          }
        },
        "required": [
          "id",
          "email",
          "name",
          "status"
        ],
        "additionalProperties": false
      },
      "Org": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "tier": {
            "type": "string",
            "enum": [
              "LENDER",
              "INSURER",
              "PLATFORM",
              "OWNER"
            ]
          },
          "tenantId": {
            "type": "string",
            "minLength": 1
          },
          "pilotStatus": {
            "type": "string",
            "enum": [
              "synthetic_demo",
              "pilot",
              "live"
            ]
          },
          "lifecycleStatus": {
            "type": "string",
            "enum": [
              "active",
              "offboarding",
              "purged"
            ]
          },
          "auditRetentionDays": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "tier",
          "tenantId",
          "pilotStatus",
          "lifecycleStatus",
          "auditRetentionDays"
        ],
        "additionalProperties": false
      },
      "OrgBilling": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "orgId": {
            "type": "string",
            "minLength": 1
          },
          "tier": {
            "type": "string",
            "enum": [
              "LENDER",
              "INSURER",
              "PLATFORM",
              "OWNER"
            ]
          },
          "state": {
            "type": "string",
            "enum": [
              "trial",
              "active",
              "past_due",
              "canceled"
            ]
          },
          "configured": {
            "type": "boolean"
          },
          "stripeCustomerPresent": {
            "type": "boolean"
          },
          "subscriptionPresent": {
            "type": "boolean"
          },
          "period": {
            "type": "string",
            "minLength": 1
          },
          "scoresUsed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "scoresQuota": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "orgId",
          "tier",
          "state",
          "configured",
          "stripeCustomerPresent",
          "subscriptionPresent",
          "period",
          "scoresUsed",
          "scoresQuota"
        ],
        "additionalProperties": false
      },
      "Membership": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "org": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "name": {
                "type": "string",
                "minLength": 1
              },
              "tier": {
                "type": "string",
                "enum": [
                  "LENDER",
                  "INSURER",
                  "PLATFORM",
                  "OWNER"
                ]
              },
              "tenantId": {
                "type": "string",
                "minLength": 1
              },
              "pilotStatus": {
                "type": "string",
                "enum": [
                  "synthetic_demo",
                  "pilot",
                  "live"
                ]
              },
              "lifecycleStatus": {
                "type": "string",
                "enum": [
                  "active",
                  "offboarding",
                  "purged"
                ]
              },
              "auditRetentionDays": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "name",
              "tier",
              "tenantId",
              "pilotStatus",
              "lifecycleStatus",
              "auditRetentionDays"
            ],
            "additionalProperties": false
          },
          "role": {
            "type": "string",
            "enum": [
              "owner",
              "admin",
              "member"
            ]
          }
        },
        "required": [
          "org",
          "role"
        ],
        "additionalProperties": false
      },
      "CurrentOrg": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "tier": {
            "type": "string",
            "enum": [
              "LENDER",
              "INSURER",
              "PLATFORM",
              "OWNER"
            ]
          },
          "tenantId": {
            "type": "string",
            "minLength": 1
          },
          "role": {
            "type": "string",
            "enum": [
              "owner",
              "admin",
              "member"
            ]
          },
          "pilotStatus": {
            "type": "string",
            "enum": [
              "synthetic_demo",
              "pilot",
              "live"
            ]
          },
          "lifecycleStatus": {
            "type": "string",
            "enum": [
              "active",
              "offboarding",
              "purged"
            ]
          },
          "auditRetentionDays": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "name",
          "tier",
          "tenantId",
          "role",
          "pilotStatus",
          "lifecycleStatus",
          "auditRetentionDays"
        ],
        "additionalProperties": false
      },
      "Me": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "user": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "email": {
                "type": "string",
                "minLength": 1
              },
              "name": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "suspended"
                ]
              }
            },
            "required": [
              "id",
              "email",
              "name",
              "status"
            ],
            "additionalProperties": false
          },
          "memberships": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "org": {
                  "type": "object",
                  "properties": {
                    "id": {
                      "type": "string",
                      "minLength": 1
                    },
                    "name": {
                      "type": "string",
                      "minLength": 1
                    },
                    "tier": {
                      "type": "string",
                      "enum": [
                        "LENDER",
                        "INSURER",
                        "PLATFORM",
                        "OWNER"
                      ]
                    },
                    "tenantId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "pilotStatus": {
                      "type": "string",
                      "enum": [
                        "synthetic_demo",
                        "pilot",
                        "live"
                      ]
                    },
                    "lifecycleStatus": {
                      "type": "string",
                      "enum": [
                        "active",
                        "offboarding",
                        "purged"
                      ]
                    },
                    "auditRetentionDays": {
                      "anyOf": [
                        {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "id",
                    "name",
                    "tier",
                    "tenantId",
                    "pilotStatus",
                    "lifecycleStatus",
                    "auditRetentionDays"
                  ],
                  "additionalProperties": false
                },
                "role": {
                  "type": "string",
                  "enum": [
                    "owner",
                    "admin",
                    "member"
                  ]
                }
              },
              "required": [
                "org",
                "role"
              ],
              "additionalProperties": false
            }
          },
          "currentOrg": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "name": {
                "type": "string",
                "minLength": 1
              },
              "tier": {
                "type": "string",
                "enum": [
                  "LENDER",
                  "INSURER",
                  "PLATFORM",
                  "OWNER"
                ]
              },
              "tenantId": {
                "type": "string",
                "minLength": 1
              },
              "role": {
                "type": "string",
                "enum": [
                  "owner",
                  "admin",
                  "member"
                ]
              },
              "pilotStatus": {
                "type": "string",
                "enum": [
                  "synthetic_demo",
                  "pilot",
                  "live"
                ]
              },
              "lifecycleStatus": {
                "type": "string",
                "enum": [
                  "active",
                  "offboarding",
                  "purged"
                ]
              },
              "auditRetentionDays": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "id",
              "name",
              "tier",
              "tenantId",
              "role",
              "pilotStatus",
              "lifecycleStatus",
              "auditRetentionDays"
            ],
            "additionalProperties": false
          },
          "mfaEnabled": {
            "type": "boolean"
          }
        },
        "required": [
          "user",
          "memberships",
          "currentOrg",
          "mfaEnabled"
        ],
        "additionalProperties": false
      },
      "OrgMember": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "user": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "email": {
                "type": "string",
                "minLength": 1
              },
              "name": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "active",
                  "suspended"
                ]
              }
            },
            "required": [
              "id",
              "email",
              "name",
              "status"
            ],
            "additionalProperties": false
          },
          "role": {
            "type": "string",
            "enum": [
              "owner",
              "admin",
              "member"
            ]
          }
        },
        "required": [
          "user",
          "role"
        ],
        "additionalProperties": false
      },
      "OrgInvitation": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "orgId": {
            "type": "string",
            "minLength": 1
          },
          "email": {
            "type": "string",
            "minLength": 1
          },
          "role": {
            "type": "string",
            "enum": [
              "owner",
              "admin",
              "member"
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          }
        },
        "required": [
          "id",
          "orgId",
          "email",
          "role",
          "createdAt",
          "expiresAt"
        ],
        "additionalProperties": false
      },
      "DestructionCertificate": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "orgId": {
            "type": "string",
            "minLength": 1
          },
          "orgName": {
            "type": "string"
          },
          "orgTenantId": {
            "type": "string"
          },
          "requestedBy": {
            "type": "string"
          },
          "executedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "manifest": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "integer",
              "minimum": 0,
              "maximum": 9007199254740991
            }
          },
          "totalRows": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "manifestSha256": {
            "type": "string",
            "minLength": 64,
            "maxLength": 64
          }
        },
        "required": [
          "id",
          "orgId",
          "orgName",
          "orgTenantId",
          "requestedBy",
          "executedAt",
          "manifest",
          "totalRows",
          "manifestSha256"
        ],
        "additionalProperties": false
      },
      "OrgDataLifecycle": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "active",
              "offboarding",
              "purged"
            ]
          },
          "auditRetentionDays": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "certificate": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "id": {
                    "type": "string",
                    "minLength": 1
                  },
                  "orgId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "orgName": {
                    "type": "string"
                  },
                  "orgTenantId": {
                    "type": "string"
                  },
                  "requestedBy": {
                    "type": "string"
                  },
                  "executedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  },
                  "manifest": {
                    "type": "object",
                    "propertyNames": {
                      "type": "string"
                    },
                    "additionalProperties": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "totalRows": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "manifestSha256": {
                    "type": "string",
                    "minLength": 64,
                    "maxLength": 64
                  }
                },
                "required": [
                  "id",
                  "orgId",
                  "orgName",
                  "orgTenantId",
                  "requestedBy",
                  "executedAt",
                  "manifest",
                  "totalRows",
                  "manifestSha256"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "status",
          "auditRetentionDays",
          "certificate"
        ],
        "additionalProperties": false
      },
      "ApiKey": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "orgId": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "prefix": {
            "type": "string",
            "minLength": 1
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "lastUsedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "revoked": {
            "type": "boolean"
          },
          "sandbox": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "orgId",
          "name",
          "prefix",
          "createdAt",
          "lastUsedAt",
          "revoked",
          "sandbox"
        ],
        "additionalProperties": false
      },
      "CreatedApiKey": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "orgId": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "prefix": {
            "type": "string",
            "minLength": 1
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "key": {
            "type": "string",
            "minLength": 1
          },
          "sandbox": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "orgId",
          "name",
          "prefix",
          "createdAt",
          "key",
          "sandbox"
        ],
        "additionalProperties": false
      },
      "AuditEvent": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "action": {
            "type": "string",
            "minLength": 1
          },
          "actorUserId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "actorEmail": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "targetType": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "targetId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "metadata": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "ip": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          }
        },
        "required": [
          "id",
          "action",
          "actorUserId",
          "actorEmail",
          "targetType",
          "targetId",
          "metadata",
          "ip",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "AuditPage": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "events": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "action": {
                  "type": "string",
                  "minLength": 1
                },
                "actorUserId": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "actorEmail": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "targetType": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "targetId": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "metadata": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                "ip": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                }
              },
              "required": [
                "id",
                "action",
                "actorUserId",
                "actorEmail",
                "targetType",
                "targetId",
                "metadata",
                "ip",
                "createdAt"
              ],
              "additionalProperties": false
            }
          },
          "nextBefore": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "events",
          "nextBefore"
        ],
        "additionalProperties": false
      },
      "Alert": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "ruleId": {
            "type": "string",
            "minLength": 1
          },
          "packId": {
            "type": "string",
            "minLength": 1
          },
          "kind": {
            "type": "string",
            "enum": [
              "soh_below",
              "residual_below",
              "flag_at_or_above"
            ]
          },
          "threshold": {
            "type": "number"
          },
          "observed": {
            "type": "number"
          },
          "status": {
            "type": "string",
            "enum": [
              "open",
              "acknowledged",
              "resolved"
            ]
          },
          "detail": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "triggeredAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          }
        },
        "required": [
          "id",
          "ruleId",
          "packId",
          "kind",
          "threshold",
          "observed",
          "status",
          "detail",
          "triggeredAt"
        ],
        "additionalProperties": false
      },
      "AlertPage": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "alerts": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "ruleId": {
                  "type": "string",
                  "minLength": 1
                },
                "packId": {
                  "type": "string",
                  "minLength": 1
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "soh_below",
                    "residual_below",
                    "flag_at_or_above"
                  ]
                },
                "threshold": {
                  "type": "number"
                },
                "observed": {
                  "type": "number"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "open",
                    "acknowledged",
                    "resolved"
                  ]
                },
                "detail": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                "triggeredAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                }
              },
              "required": [
                "id",
                "ruleId",
                "packId",
                "kind",
                "threshold",
                "observed",
                "status",
                "detail",
                "triggeredAt"
              ],
              "additionalProperties": false
            }
          },
          "nextBefore": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "alerts",
          "nextBefore"
        ],
        "additionalProperties": false
      },
      "AlertRule": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "kind": {
            "type": "string",
            "enum": [
              "soh_below",
              "residual_below",
              "flag_at_or_above"
            ]
          },
          "threshold": {
            "type": "number"
          },
          "enabled": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          }
        },
        "required": [
          "id",
          "kind",
          "threshold",
          "enabled",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "WebhookDelivery": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "endpointId": {
            "type": "string",
            "minLength": 1
          },
          "endpointUrl": {
            "type": "string",
            "minLength": 1
          },
          "alertId": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "delivered",
              "failed",
              "dead"
            ]
          },
          "responseCode": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "attempts": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "lastError": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "nextAttemptAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "deliveredAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "endpointId",
          "endpointUrl",
          "alertId",
          "status",
          "responseCode",
          "attempts",
          "lastError",
          "nextAttemptAt",
          "createdAt",
          "deliveredAt"
        ],
        "additionalProperties": false
      },
      "WebhookDeliveryPage": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "deliveries": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "endpointId": {
                  "type": "string",
                  "minLength": 1
                },
                "endpointUrl": {
                  "type": "string",
                  "minLength": 1
                },
                "alertId": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "pending",
                    "delivered",
                    "failed",
                    "dead"
                  ]
                },
                "responseCode": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "attempts": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "lastError": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "nextAttemptAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "deliveredAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "endpointId",
                "endpointUrl",
                "alertId",
                "status",
                "responseCode",
                "attempts",
                "lastError",
                "nextAttemptAt",
                "createdAt",
                "deliveredAt"
              ],
              "additionalProperties": false
            }
          },
          "nextBefore": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "deliveries",
          "nextBefore"
        ],
        "additionalProperties": false
      },
      "WebhookDeliveryStatus": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "string",
        "enum": [
          "pending",
          "delivered",
          "failed",
          "dead"
        ]
      },
      "WebhookEndpoint": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "url": {
            "type": "string",
            "minLength": 1
          },
          "enabled": {
            "type": "boolean"
          },
          "hasSecret": {
            "type": "boolean"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          }
        },
        "required": [
          "id",
          "url",
          "enabled",
          "hasSecret",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "DriftFeature": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "feature": {
            "type": "string",
            "minLength": 1
          },
          "kind": {
            "type": "string",
            "enum": [
              "numeric",
              "categorical"
            ]
          },
          "psi": {
            "type": "number"
          },
          "status": {
            "type": "string",
            "enum": [
              "stable",
              "moderate",
              "significant"
            ]
          }
        },
        "required": [
          "feature",
          "kind",
          "psi",
          "status"
        ],
        "additionalProperties": false
      },
      "DriftSnapshot": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "computedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "nPacks": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "overallStatus": {
            "type": "string",
            "enum": [
              "stable",
              "moderate",
              "significant"
            ]
          },
          "recalibrationRecommended": {
            "type": "boolean"
          },
          "nSignificant": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "nModerate": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "features": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "feature": {
                  "type": "string",
                  "minLength": 1
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "numeric",
                    "categorical"
                  ]
                },
                "psi": {
                  "type": "number"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "stable",
                    "moderate",
                    "significant"
                  ]
                }
              },
              "required": [
                "feature",
                "kind",
                "psi",
                "status"
              ],
              "additionalProperties": false
            }
          },
          "note": {
            "type": "string"
          },
          "modelVersion": {
            "type": "string"
          }
        },
        "required": [
          "computedAt",
          "nPacks",
          "overallStatus",
          "recalibrationRecommended",
          "nSignificant",
          "nModerate",
          "features",
          "note",
          "modelVersion"
        ],
        "additionalProperties": false
      },
      "FleetIngestResult": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "ingested": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "scored": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "failed": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "packId": {
                  "type": "string"
                },
                "error": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "packId",
                "error"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "ingested",
          "scored",
          "failed"
        ],
        "additionalProperties": false
      },
      "AgentChatMessage": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "role": {
            "type": "string",
            "enum": [
              "user",
              "assistant"
            ]
          },
          "content": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "role",
          "content"
        ],
        "additionalProperties": false
      },
      "AgentCitation": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "tool": {
            "type": "string",
            "minLength": 1
          },
          "ref": {
            "type": "string",
            "minLength": 1
          },
          "label": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "tool",
          "ref",
          "label"
        ],
        "additionalProperties": false
      },
      "AgentChatRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "minLength": 1
          },
          "history": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "role": {
                  "type": "string",
                  "enum": [
                    "user",
                    "assistant"
                  ]
                },
                "content": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "role",
                "content"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "message",
          "history"
        ],
        "additionalProperties": false
      },
      "AgentChatResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "message": {
            "type": "object",
            "properties": {
              "role": {
                "type": "string",
                "enum": [
                  "user",
                  "assistant"
                ]
              },
              "content": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "role",
              "content"
            ],
            "additionalProperties": false
          },
          "citations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tool": {
                  "type": "string",
                  "minLength": 1
                },
                "ref": {
                  "type": "string",
                  "minLength": 1
                },
                "label": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "tool",
                "ref",
                "label"
              ],
              "additionalProperties": false
            }
          },
          "modelVersion": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "message",
          "citations",
          "modelVersion"
        ],
        "additionalProperties": false
      },
      "ExtractedIdentity": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "packId": {
            "type": "string",
            "pattern": "^[0-9A-Z]{21}$"
          },
          "chemistry": {
            "type": "string",
            "enum": [
              "LFP",
              "NMC"
            ]
          },
          "segment": {
            "type": "string",
            "enum": [
              "2W",
              "3W",
              "COMMERCIAL",
              "4W"
            ]
          },
          "region": {
            "type": "string",
            "minLength": 1
          },
          "climateZone": {
            "type": "string",
            "minLength": 1
          },
          "ratedCapacityKwh": {
            "type": "number",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "packId",
          "chemistry",
          "segment",
          "ratedCapacityKwh"
        ],
        "additionalProperties": false
      },
      "ExtractedObservation": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "months": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "cumulativeChargeKwh": {
            "type": "number"
          },
          "cumulativeDischargeKwh": {
            "type": "number"
          },
          "equivalentFullCycles": {
            "type": "number"
          },
          "cycleCount": {
            "type": "number"
          },
          "hotHoursCumulative": {
            "type": "number"
          },
          "meanDod": {
            "type": "number"
          },
          "fastChargeFraction": {
            "type": "number"
          },
          "resistanceProxyOhm": {
            "type": "number"
          },
          "resistanceRatio": {
            "type": "number"
          },
          "coulombicEfficiency": {
            "type": "number"
          },
          "meanPackTempC": {
            "type": "number"
          },
          "naiveSohProxy": {
            "type": "number"
          }
        },
        "required": [
          "months",
          "equivalentFullCycles",
          "meanDod",
          "fastChargeFraction",
          "resistanceProxyOhm",
          "resistanceRatio",
          "coulombicEfficiency",
          "meanPackTempC"
        ],
        "additionalProperties": false
      },
      "ExtractWarning": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "field": {
            "type": "string",
            "minLength": 1
          },
          "message": {
            "type": "string",
            "minLength": 1
          },
          "severity": {
            "type": "string",
            "enum": [
              "info",
              "warning",
              "error"
            ]
          }
        },
        "required": [
          "field",
          "message",
          "severity"
        ],
        "additionalProperties": false
      },
      "ExtractedRow": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "identity": {
            "type": "object",
            "properties": {
              "packId": {
                "type": "string",
                "pattern": "^[0-9A-Z]{21}$"
              },
              "chemistry": {
                "type": "string",
                "enum": [
                  "LFP",
                  "NMC"
                ]
              },
              "segment": {
                "type": "string",
                "enum": [
                  "2W",
                  "3W",
                  "COMMERCIAL",
                  "4W"
                ]
              },
              "region": {
                "type": "string",
                "minLength": 1
              },
              "climateZone": {
                "type": "string",
                "minLength": 1
              },
              "ratedCapacityKwh": {
                "type": "number",
                "exclusiveMinimum": 0
              }
            },
            "required": [
              "packId",
              "chemistry",
              "segment",
              "ratedCapacityKwh"
            ],
            "additionalProperties": false
          },
          "observations": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "months": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "cumulativeChargeKwh": {
                  "type": "number"
                },
                "cumulativeDischargeKwh": {
                  "type": "number"
                },
                "equivalentFullCycles": {
                  "type": "number"
                },
                "cycleCount": {
                  "type": "number"
                },
                "hotHoursCumulative": {
                  "type": "number"
                },
                "meanDod": {
                  "type": "number"
                },
                "fastChargeFraction": {
                  "type": "number"
                },
                "resistanceProxyOhm": {
                  "type": "number"
                },
                "resistanceRatio": {
                  "type": "number"
                },
                "coulombicEfficiency": {
                  "type": "number"
                },
                "meanPackTempC": {
                  "type": "number"
                },
                "naiveSohProxy": {
                  "type": "number"
                }
              },
              "required": [
                "months",
                "equivalentFullCycles",
                "meanDod",
                "fastChargeFraction",
                "resistanceProxyOhm",
                "resistanceRatio",
                "coulombicEfficiency",
                "meanPackTempC"
              ],
              "additionalProperties": false
            }
          },
          "sourceRef": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "identity",
          "observations"
        ],
        "additionalProperties": false
      },
      "ExtractRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "rawText": {
            "type": "string",
            "minLength": 1
          },
          "hint": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "rawText"
        ],
        "additionalProperties": false
      },
      "ExtractResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "rows": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "identity": {
                  "type": "object",
                  "properties": {
                    "packId": {
                      "type": "string",
                      "pattern": "^[0-9A-Z]{21}$"
                    },
                    "chemistry": {
                      "type": "string",
                      "enum": [
                        "LFP",
                        "NMC"
                      ]
                    },
                    "segment": {
                      "type": "string",
                      "enum": [
                        "2W",
                        "3W",
                        "COMMERCIAL",
                        "4W"
                      ]
                    },
                    "region": {
                      "type": "string",
                      "minLength": 1
                    },
                    "climateZone": {
                      "type": "string",
                      "minLength": 1
                    },
                    "ratedCapacityKwh": {
                      "type": "number",
                      "exclusiveMinimum": 0
                    }
                  },
                  "required": [
                    "packId",
                    "chemistry",
                    "segment",
                    "ratedCapacityKwh"
                  ],
                  "additionalProperties": false
                },
                "observations": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "months": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "cumulativeChargeKwh": {
                        "type": "number"
                      },
                      "cumulativeDischargeKwh": {
                        "type": "number"
                      },
                      "equivalentFullCycles": {
                        "type": "number"
                      },
                      "cycleCount": {
                        "type": "number"
                      },
                      "hotHoursCumulative": {
                        "type": "number"
                      },
                      "meanDod": {
                        "type": "number"
                      },
                      "fastChargeFraction": {
                        "type": "number"
                      },
                      "resistanceProxyOhm": {
                        "type": "number"
                      },
                      "resistanceRatio": {
                        "type": "number"
                      },
                      "coulombicEfficiency": {
                        "type": "number"
                      },
                      "meanPackTempC": {
                        "type": "number"
                      },
                      "naiveSohProxy": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "months",
                      "equivalentFullCycles",
                      "meanDod",
                      "fastChargeFraction",
                      "resistanceProxyOhm",
                      "resistanceRatio",
                      "coulombicEfficiency",
                      "meanPackTempC"
                    ],
                    "additionalProperties": false
                  }
                },
                "sourceRef": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "identity",
                "observations"
              ],
              "additionalProperties": false
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string",
                  "minLength": 1
                },
                "message": {
                  "type": "string",
                  "minLength": 1
                },
                "severity": {
                  "type": "string",
                  "enum": [
                    "info",
                    "warning",
                    "error"
                  ]
                }
              },
              "required": [
                "field",
                "message",
                "severity"
              ],
              "additionalProperties": false
            }
          },
          "modelVersion": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "rows",
          "warnings",
          "modelVersion"
        ],
        "additionalProperties": false
      },
      "NarrateRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "packId": {
            "type": "string",
            "pattern": "^[0-9A-Z]{21}$"
          },
          "audience": {
            "type": "string",
            "enum": [
              "lender",
              "owner",
              "analyst"
            ]
          }
        },
        "required": [
          "packId"
        ],
        "additionalProperties": false
      },
      "NarrateResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "narrative": {
            "type": "string",
            "minLength": 1
          },
          "audience": {
            "type": "string",
            "enum": [
              "lender",
              "owner",
              "analyst"
            ]
          },
          "modelVersion": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "narrative",
          "audience",
          "modelVersion"
        ],
        "additionalProperties": false
      },
      "TriageRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "alertId": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "alertId"
        ],
        "additionalProperties": false
      },
      "TriageResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "note": {
            "type": "string",
            "minLength": 1
          },
          "citations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "tool": {
                  "type": "string",
                  "minLength": 1
                },
                "ref": {
                  "type": "string",
                  "minLength": 1
                },
                "label": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "tool",
                "ref",
                "label"
              ],
              "additionalProperties": false
            }
          },
          "modelVersion": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "note",
          "citations",
          "modelVersion"
        ],
        "additionalProperties": false
      },
      "MockProvenance": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "provider": {
            "type": "string",
            "minLength": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "mock",
              "partial",
              "real"
            ]
          },
          "note": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "provider",
          "status",
          "note"
        ],
        "additionalProperties": false
      },
      "IntegrationCatalogEntry": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "providerKey": {
            "type": "string",
            "minLength": 1
          },
          "displayName": {
            "type": "string",
            "minLength": 1
          },
          "category": {
            "type": "string",
            "minLength": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "mock",
              "partial",
              "real"
            ]
          },
          "mode": {
            "type": "string",
            "enum": [
              "mock",
              "real"
            ]
          },
          "configured": {
            "type": "boolean"
          },
          "unMockingRequires": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "providerKey",
          "displayName",
          "category",
          "status",
          "mode",
          "configured",
          "unMockingRequires"
        ],
        "additionalProperties": false
      },
      "IntegrationCatalogResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "integrations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "providerKey": {
                  "type": "string",
                  "minLength": 1
                },
                "displayName": {
                  "type": "string",
                  "minLength": 1
                },
                "category": {
                  "type": "string",
                  "minLength": 1
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "mock",
                    "partial",
                    "real"
                  ]
                },
                "mode": {
                  "type": "string",
                  "enum": [
                    "mock",
                    "real"
                  ]
                },
                "configured": {
                  "type": "boolean"
                },
                "unMockingRequires": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "providerKey",
                "displayName",
                "category",
                "status",
                "mode",
                "configured",
                "unMockingRequires"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "integrations"
        ],
        "additionalProperties": false
      },
      "ProviderConfigUpdateRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "mode": {
            "type": "string",
            "enum": [
              "mock",
              "real"
            ]
          },
          "config": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "secret": {
            "type": "string"
          }
        },
        "required": [
          "mode",
          "config"
        ],
        "additionalProperties": false
      },
      "Applicant": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "applicantId": {
            "type": "string",
            "minLength": 1
          },
          "displayName": {
            "type": "string",
            "minLength": 1
          },
          "state": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "applicantId",
          "displayName",
          "state"
        ],
        "additionalProperties": false
      },
      "DocumentRef": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "documentId": {
            "type": "string",
            "minLength": 1
          },
          "kind": {
            "type": "string",
            "enum": [
              "pay_stub",
              "bank_statement",
              "id_document",
              "vehicle_title",
              "other"
            ]
          },
          "filename": {
            "type": "string",
            "minLength": 1
          },
          "received": {
            "type": "boolean"
          }
        },
        "required": [
          "documentId",
          "kind",
          "filename",
          "received"
        ],
        "additionalProperties": false
      },
      "CollateralRef": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "kind": {
            "type": "string",
            "enum": [
              "none",
              "vehicle",
              "ev_battery",
              "other"
            ]
          },
          "descriptor": {
            "type": "string",
            "minLength": 1
          },
          "statedValue": {
            "type": "number",
            "minimum": 0
          }
        },
        "required": [
          "kind",
          "descriptor"
        ],
        "additionalProperties": false
      },
      "LenderSuppliedFacts": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "creditScore": {
            "type": "integer",
            "minimum": 300,
            "maximum": 850
          },
          "dti": {
            "type": "number",
            "minimum": 0
          },
          "monthlyIncome": {
            "type": "number",
            "minimum": 0
          },
          "requestedAmount": {
            "type": "number",
            "minimum": 0
          },
          "requestedTermMonths": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "identityVerified": {
            "type": "boolean"
          },
          "fraudRisk": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "collateralValue": {
            "type": "number",
            "minimum": 0
          },
          "ltv": {
            "type": "number",
            "minimum": 0
          },
          "nsfCount90d": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "derogatories": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "additionalProperties": false
      },
      "LoanApplication": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "applicationId": {
            "type": "string",
            "minLength": 1
          },
          "product": {
            "type": "string",
            "enum": [
              "personal_loan",
              "auto_loan",
              "ev_loan"
            ]
          },
          "applicant": {
            "type": "object",
            "properties": {
              "applicantId": {
                "type": "string",
                "minLength": 1
              },
              "displayName": {
                "type": "string",
                "minLength": 1
              },
              "state": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "applicantId",
              "displayName",
              "state"
            ],
            "additionalProperties": false
          },
          "requestedAmount": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "requestedTermMonths": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "collateral": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "none",
                  "vehicle",
                  "ev_battery",
                  "other"
                ]
              },
              "descriptor": {
                "type": "string",
                "minLength": 1
              },
              "statedValue": {
                "type": "number",
                "minimum": 0
              }
            },
            "required": [
              "kind",
              "descriptor"
            ],
            "additionalProperties": false
          },
          "documents": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "documentId": {
                  "type": "string",
                  "minLength": 1
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "pay_stub",
                    "bank_statement",
                    "id_document",
                    "vehicle_title",
                    "other"
                  ]
                },
                "filename": {
                  "type": "string",
                  "minLength": 1
                },
                "received": {
                  "type": "boolean"
                }
              },
              "required": [
                "documentId",
                "kind",
                "filename",
                "received"
              ],
              "additionalProperties": false
            }
          },
          "status": {
            "type": "string",
            "enum": [
              "received",
              "processing",
              "decided",
              "referred"
            ]
          },
          "submittedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "suppliedFacts": {
            "type": "object",
            "properties": {
              "creditScore": {
                "type": "integer",
                "minimum": 300,
                "maximum": 850
              },
              "dti": {
                "type": "number",
                "minimum": 0
              },
              "monthlyIncome": {
                "type": "number",
                "minimum": 0
              },
              "requestedAmount": {
                "type": "number",
                "minimum": 0
              },
              "requestedTermMonths": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "identityVerified": {
                "type": "boolean"
              },
              "fraudRisk": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "collateralValue": {
                "type": "number",
                "minimum": 0
              },
              "ltv": {
                "type": "number",
                "minimum": 0
              },
              "nsfCount90d": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "derogatories": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "additionalProperties": false
          }
        },
        "required": [
          "applicationId",
          "product",
          "applicant",
          "requestedAmount",
          "requestedTermMonths",
          "documents",
          "status",
          "submittedAt"
        ],
        "additionalProperties": false
      },
      "AgentOutput": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "agent": {
            "type": "string",
            "enum": [
              "intake",
              "identity_fraud",
              "income",
              "credit",
              "collateral",
              "policy",
              "decision"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "ok",
              "flag",
              "error"
            ]
          },
          "summary": {
            "type": "string",
            "minLength": 1
          },
          "data": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "string"
            }
          },
          "mocks": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "provider": {
                  "type": "string",
                  "minLength": 1
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "mock",
                    "partial",
                    "real"
                  ]
                },
                "note": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "provider",
                "status",
                "note"
              ],
              "additionalProperties": false
            }
          },
          "startedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "finishedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          }
        },
        "required": [
          "agent",
          "status",
          "summary",
          "data",
          "mocks",
          "startedAt",
          "finishedAt"
        ],
        "additionalProperties": false
      },
      "AgentSpec": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "agent": {
            "type": "string",
            "enum": [
              "intake",
              "identity_fraud",
              "income",
              "credit",
              "collateral",
              "policy",
              "decision"
            ]
          },
          "config": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "string"
            }
          },
          "enabled": {
            "type": "boolean"
          }
        },
        "required": [
          "agent",
          "config",
          "enabled"
        ],
        "additionalProperties": false
      },
      "AgentPipelineConfig": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "agents": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "agent": {
                  "type": "string",
                  "enum": [
                    "intake",
                    "identity_fraud",
                    "income",
                    "credit",
                    "collateral",
                    "policy",
                    "decision"
                  ]
                },
                "config": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "string"
                  }
                },
                "enabled": {
                  "type": "boolean"
                }
              },
              "required": [
                "agent",
                "config",
                "enabled"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "agents"
        ],
        "additionalProperties": false
      },
      "AgentCatalogEntry": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "agent": {
            "type": "string",
            "enum": [
              "intake",
              "identity_fraud",
              "income",
              "credit",
              "collateral",
              "policy",
              "decision"
            ]
          },
          "description": {
            "type": "string",
            "minLength": 1
          },
          "required": {
            "type": "boolean"
          }
        },
        "required": [
          "agent",
          "description",
          "required"
        ],
        "additionalProperties": false
      },
      "AgentCatalogResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "agents": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "agent": {
                  "type": "string",
                  "enum": [
                    "intake",
                    "identity_fraud",
                    "income",
                    "credit",
                    "collateral",
                    "policy",
                    "decision"
                  ]
                },
                "description": {
                  "type": "string",
                  "minLength": 1
                },
                "required": {
                  "type": "boolean"
                }
              },
              "required": [
                "agent",
                "description",
                "required"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "agents"
        ],
        "additionalProperties": false
      },
      "PolicyClause": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "clauseId": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "description": {
            "type": "string",
            "minLength": 1
          },
          "rule": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "clauseId",
          "name",
          "description",
          "rule"
        ],
        "additionalProperties": false
      },
      "HardCutoff": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "cutoffId": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "field": {
            "type": "string",
            "minLength": 1
          },
          "op": {
            "type": "string",
            "enum": [
              "gte",
              "lte",
              "gt",
              "lt",
              "eq",
              "ne"
            ]
          },
          "threshold": {
            "type": "number"
          },
          "outcome": {
            "type": "string",
            "enum": [
              "approve",
              "decline",
              "refer"
            ]
          },
          "description": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "cutoffId",
          "name",
          "field",
          "op",
          "threshold",
          "outcome",
          "description"
        ],
        "additionalProperties": false
      },
      "Policy": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "policyId": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "string",
            "minLength": 1
          },
          "product": {
            "type": "string",
            "enum": [
              "personal_loan",
              "auto_loan",
              "ev_loan"
            ]
          },
          "clauses": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "clauseId": {
                  "type": "string",
                  "minLength": 1
                },
                "name": {
                  "type": "string",
                  "minLength": 1
                },
                "description": {
                  "type": "string",
                  "minLength": 1
                },
                "rule": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "clauseId",
                "name",
                "description",
                "rule"
              ],
              "additionalProperties": false
            }
          },
          "hardCutoffs": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "cutoffId": {
                  "type": "string",
                  "minLength": 1
                },
                "name": {
                  "type": "string",
                  "minLength": 1
                },
                "field": {
                  "type": "string",
                  "minLength": 1
                },
                "op": {
                  "type": "string",
                  "enum": [
                    "gte",
                    "lte",
                    "gt",
                    "lt",
                    "eq",
                    "ne"
                  ]
                },
                "threshold": {
                  "type": "number"
                },
                "outcome": {
                  "type": "string",
                  "enum": [
                    "approve",
                    "decline",
                    "refer"
                  ]
                },
                "description": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "cutoffId",
                "name",
                "field",
                "op",
                "threshold",
                "outcome",
                "description"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "policyId",
          "name",
          "version",
          "product",
          "clauses",
          "hardCutoffs"
        ],
        "additionalProperties": false
      },
      "PolicyListResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "policies": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "policyId": {
                  "type": "string",
                  "minLength": 1
                },
                "name": {
                  "type": "string",
                  "minLength": 1
                },
                "version": {
                  "type": "string",
                  "minLength": 1
                },
                "product": {
                  "type": "string",
                  "enum": [
                    "personal_loan",
                    "auto_loan",
                    "ev_loan"
                  ]
                },
                "clauses": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "clauseId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "description": {
                        "type": "string",
                        "minLength": 1
                      },
                      "rule": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "clauseId",
                      "name",
                      "description",
                      "rule"
                    ],
                    "additionalProperties": false
                  }
                },
                "hardCutoffs": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "cutoffId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "field": {
                        "type": "string",
                        "minLength": 1
                      },
                      "op": {
                        "type": "string",
                        "enum": [
                          "gte",
                          "lte",
                          "gt",
                          "lt",
                          "eq",
                          "ne"
                        ]
                      },
                      "threshold": {
                        "type": "number"
                      },
                      "outcome": {
                        "type": "string",
                        "enum": [
                          "approve",
                          "decline",
                          "refer"
                        ]
                      },
                      "description": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "cutoffId",
                      "name",
                      "field",
                      "op",
                      "threshold",
                      "outcome",
                      "description"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "policyId",
                "name",
                "version",
                "product",
                "clauses",
                "hardCutoffs"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "policies"
        ],
        "additionalProperties": false
      },
      "PolicyDraftRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "policyId": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string",
            "minLength": 1
          },
          "version": {
            "type": "string",
            "minLength": 1
          },
          "product": {
            "type": "string",
            "enum": [
              "personal_loan",
              "auto_loan",
              "ev_loan"
            ]
          },
          "clauses": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "clauseId": {
                  "type": "string",
                  "minLength": 1
                },
                "name": {
                  "type": "string",
                  "minLength": 1
                },
                "description": {
                  "type": "string",
                  "minLength": 1
                },
                "rule": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "clauseId",
                "name",
                "description",
                "rule"
              ],
              "additionalProperties": false
            }
          },
          "hardCutoffs": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "cutoffId": {
                  "type": "string",
                  "minLength": 1
                },
                "name": {
                  "type": "string",
                  "minLength": 1
                },
                "field": {
                  "type": "string",
                  "minLength": 1
                },
                "op": {
                  "type": "string",
                  "enum": [
                    "gte",
                    "lte",
                    "gt",
                    "lt",
                    "eq",
                    "ne"
                  ]
                },
                "threshold": {
                  "type": "number"
                },
                "outcome": {
                  "type": "string",
                  "enum": [
                    "approve",
                    "decline",
                    "refer"
                  ]
                },
                "description": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "cutoffId",
                "name",
                "field",
                "op",
                "threshold",
                "outcome",
                "description"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "name",
          "product",
          "clauses",
          "hardCutoffs"
        ],
        "additionalProperties": false
      },
      "PolicyVersionList": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "versions": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "policyId": {
                  "type": "string",
                  "minLength": 1
                },
                "name": {
                  "type": "string",
                  "minLength": 1
                },
                "version": {
                  "type": "string",
                  "minLength": 1
                },
                "product": {
                  "type": "string",
                  "enum": [
                    "personal_loan",
                    "auto_loan",
                    "ev_loan"
                  ]
                },
                "clauses": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "clauseId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "description": {
                        "type": "string",
                        "minLength": 1
                      },
                      "rule": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "clauseId",
                      "name",
                      "description",
                      "rule"
                    ],
                    "additionalProperties": false
                  }
                },
                "hardCutoffs": {
                  "minItems": 1,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "cutoffId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "name": {
                        "type": "string",
                        "minLength": 1
                      },
                      "field": {
                        "type": "string",
                        "minLength": 1
                      },
                      "op": {
                        "type": "string",
                        "enum": [
                          "gte",
                          "lte",
                          "gt",
                          "lt",
                          "eq",
                          "ne"
                        ]
                      },
                      "threshold": {
                        "type": "number"
                      },
                      "outcome": {
                        "type": "string",
                        "enum": [
                          "approve",
                          "decline",
                          "refer"
                        ]
                      },
                      "description": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "cutoffId",
                      "name",
                      "field",
                      "op",
                      "threshold",
                      "outcome",
                      "description"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "policyId",
                "name",
                "version",
                "product",
                "clauses",
                "hardCutoffs"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "versions"
        ],
        "additionalProperties": false
      },
      "PolicyLifecycleResult": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "policyId": {
            "type": "string",
            "minLength": 1
          },
          "product": {
            "type": "string",
            "enum": [
              "personal_loan",
              "auto_loan",
              "ev_loan"
            ]
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "staged",
              "active",
              "archived"
            ]
          },
          "previousActiveId": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "policyId",
          "product",
          "status",
          "previousActiveId"
        ],
        "additionalProperties": false
      },
      "DecisionReasonCode": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "code": {
            "type": "string",
            "minLength": 1
          },
          "label": {
            "type": "string",
            "minLength": 1
          },
          "detail": {
            "type": "string",
            "minLength": 1
          },
          "groundedInClauseIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "groundedInFacts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "code",
          "label",
          "detail",
          "groundedInClauseIds",
          "groundedInFacts"
        ],
        "additionalProperties": false
      },
      "DecisionConfidence": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "score": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "level": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ]
          }
        },
        "required": [
          "score",
          "level"
        ],
        "additionalProperties": false
      },
      "DecisionPricing": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "apr": {
            "type": "number",
            "minimum": 0
          },
          "amount": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "termMonths": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "apr",
          "amount",
          "termMonths"
        ],
        "additionalProperties": false
      },
      "ShadowRead": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "outcome": {
            "type": "string",
            "enum": [
              "approve",
              "decline",
              "refer"
            ]
          },
          "score": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "agreesWithDecision": {
            "type": "boolean"
          },
          "note": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "outcome",
          "score",
          "agreesWithDecision",
          "note"
        ],
        "additionalProperties": false
      },
      "LlmExchange": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "request": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          },
          "response": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {}
          }
        },
        "required": [
          "request",
          "response"
        ],
        "additionalProperties": false
      },
      "LlmTranscript": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "schemaVersion": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "modelId": {
            "type": "string",
            "minLength": 1
          },
          "exchanges": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "request": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                },
                "response": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {}
                }
              },
              "required": [
                "request",
                "response"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "schemaVersion",
          "modelId",
          "exchanges"
        ],
        "additionalProperties": false
      },
      "Decision": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "decisionId": {
            "type": "string",
            "minLength": 1
          },
          "applicationId": {
            "type": "string",
            "minLength": 1
          },
          "outcome": {
            "type": "string",
            "enum": [
              "approve",
              "decline",
              "refer"
            ]
          },
          "pricing": {
            "type": "object",
            "properties": {
              "apr": {
                "type": "number",
                "minimum": 0
              },
              "amount": {
                "type": "number",
                "exclusiveMinimum": 0
              },
              "termMonths": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "apr",
              "amount",
              "termMonths"
            ],
            "additionalProperties": false
          },
          "reasonCodes": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "minLength": 1
                },
                "label": {
                  "type": "string",
                  "minLength": 1
                },
                "detail": {
                  "type": "string",
                  "minLength": 1
                },
                "groundedInClauseIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "groundedInFacts": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "code",
                "label",
                "detail",
                "groundedInClauseIds",
                "groundedInFacts"
              ],
              "additionalProperties": false
            }
          },
          "confidence": {
            "type": "object",
            "properties": {
              "score": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "level": {
                "type": "string",
                "enum": [
                  "low",
                  "medium",
                  "high"
                ]
              }
            },
            "required": [
              "score",
              "level"
            ],
            "additionalProperties": false
          },
          "shadow": {
            "type": "object",
            "properties": {
              "outcome": {
                "type": "string",
                "enum": [
                  "approve",
                  "decline",
                  "refer"
                ]
              },
              "score": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "agreesWithDecision": {
                "type": "boolean"
              },
              "note": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "outcome",
              "score",
              "agreesWithDecision",
              "note"
            ],
            "additionalProperties": false
          },
          "decidedBy": {
            "type": "string",
            "minLength": 1
          },
          "modelVersion": {
            "type": "string",
            "minLength": 1
          },
          "policyVersion": {
            "type": "string",
            "minLength": 1
          },
          "providerVersions": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "string"
            }
          },
          "mocks": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "provider": {
                  "type": "string",
                  "minLength": 1
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "mock",
                    "partial",
                    "real"
                  ]
                },
                "note": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "provider",
                "status",
                "note"
              ],
              "additionalProperties": false
            }
          },
          "decidedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "llmTranscript": {
            "type": "object",
            "properties": {
              "schemaVersion": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "modelId": {
                "type": "string",
                "minLength": 1
              },
              "exchanges": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "request": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {}
                    },
                    "response": {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {}
                    }
                  },
                  "required": [
                    "request",
                    "response"
                  ],
                  "additionalProperties": false
                }
              }
            },
            "required": [
              "schemaVersion",
              "modelId",
              "exchanges"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "decisionId",
          "applicationId",
          "outcome",
          "reasonCodes",
          "confidence",
          "decidedBy",
          "modelVersion",
          "policyVersion",
          "providerVersions",
          "mocks",
          "decidedAt"
        ],
        "additionalProperties": false
      },
      "PrincipalReasonDetail": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "statement": {
            "type": "string",
            "minLength": 1
          },
          "reasonCode": {
            "type": "string",
            "minLength": 1
          },
          "groundedInClauseIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "groundedInFacts": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "statement",
          "reasonCode",
          "groundedInClauseIds",
          "groundedInFacts"
        ],
        "additionalProperties": false
      },
      "CreditScoreDisclosure": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "score": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "scoreRangeMin": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "scoreRangeMax": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "keyFactors": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "consumerReportingAgencyContact": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "score",
          "scoreRangeMin",
          "scoreRangeMax",
          "keyFactors",
          "consumerReportingAgencyContact"
        ],
        "additionalProperties": false
      },
      "FcraCreditScoreDisclosure": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "score": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "scoreRangeMin": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "scoreRangeMax": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "scoreDate": {
            "type": "string",
            "minLength": 1
          },
          "keyFactors": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          }
        },
        "required": [
          "score",
          "scoreRangeMin",
          "scoreRangeMax",
          "scoreDate",
          "keyFactors"
        ],
        "additionalProperties": false
      },
      "FcraDisclosure": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "craName": {
            "type": "string",
            "minLength": 1
          },
          "craAddress": {
            "type": "string",
            "minLength": 1
          },
          "craPhone": {
            "type": "string",
            "minLength": 1
          },
          "craDidNotDecideStatement": {
            "type": "string",
            "minLength": 1
          },
          "freeReportRightStatement": {
            "type": "string",
            "minLength": 1
          },
          "disputeRightStatement": {
            "type": "string",
            "minLength": 1
          },
          "creditScoreDisclosure": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "score": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "scoreRangeMin": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "scoreRangeMax": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "scoreDate": {
                    "type": "string",
                    "minLength": 1
                  },
                  "keyFactors": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  }
                },
                "required": [
                  "score",
                  "scoreRangeMin",
                  "scoreRangeMax",
                  "scoreDate",
                  "keyFactors"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "craName",
          "craAddress",
          "craPhone",
          "craDidNotDecideStatement",
          "freeReportRightStatement",
          "disputeRightStatement",
          "creditScoreDisclosure"
        ],
        "additionalProperties": false
      },
      "AdverseActionNotice": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "applicationId": {
            "type": "string",
            "minLength": 1
          },
          "decisionId": {
            "type": "string",
            "minLength": 1
          },
          "principalReasons": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "principalReasonDetails": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "statement": {
                  "type": "string",
                  "minLength": 1
                },
                "reasonCode": {
                  "type": "string",
                  "minLength": 1
                },
                "groundedInClauseIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "groundedInFacts": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "statement",
                "reasonCode",
                "groundedInClauseIds",
                "groundedInFacts"
              ],
              "additionalProperties": false
            }
          },
          "regulatoryBasis": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "body": {
            "type": "string",
            "minLength": 1
          },
          "creditorContact": {
            "type": "string",
            "minLength": 1
          },
          "creditScoreDisclosure": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "score": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "scoreRangeMin": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "scoreRangeMax": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "keyFactors": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "consumerReportingAgencyContact": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "score",
                  "scoreRangeMin",
                  "scoreRangeMax",
                  "keyFactors",
                  "consumerReportingAgencyContact"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "fcraDisclosure": {
            "type": "object",
            "properties": {
              "craName": {
                "type": "string",
                "minLength": 1
              },
              "craAddress": {
                "type": "string",
                "minLength": 1
              },
              "craPhone": {
                "type": "string",
                "minLength": 1
              },
              "craDidNotDecideStatement": {
                "type": "string",
                "minLength": 1
              },
              "freeReportRightStatement": {
                "type": "string",
                "minLength": 1
              },
              "disputeRightStatement": {
                "type": "string",
                "minLength": 1
              },
              "creditScoreDisclosure": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "score": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "scoreRangeMin": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "scoreRangeMax": {
                        "type": "integer",
                        "minimum": -9007199254740991,
                        "maximum": 9007199254740991
                      },
                      "scoreDate": {
                        "type": "string",
                        "minLength": 1
                      },
                      "keyFactors": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        }
                      }
                    },
                    "required": [
                      "score",
                      "scoreRangeMin",
                      "scoreRangeMax",
                      "scoreDate",
                      "keyFactors"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "craName",
              "craAddress",
              "craPhone",
              "craDidNotDecideStatement",
              "freeReportRightStatement",
              "disputeRightStatement",
              "creditScoreDisclosure"
            ],
            "additionalProperties": false
          },
          "generatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          }
        },
        "required": [
          "applicationId",
          "decisionId",
          "principalReasons",
          "principalReasonDetails",
          "regulatoryBasis",
          "body",
          "creditorContact",
          "creditScoreDisclosure",
          "generatedAt"
        ],
        "additionalProperties": false
      },
      "ApplicationAuditEvent": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "eventId": {
            "type": "string",
            "minLength": 1
          },
          "applicationId": {
            "type": "string",
            "minLength": 1
          },
          "sequence": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "kind": {
            "type": "string",
            "enum": [
              "application_received",
              "agent_started",
              "tool_called",
              "agent_finished",
              "decision_rendered",
              "routed_to_human",
              "notice_generated"
            ]
          },
          "actor": {
            "type": "string",
            "minLength": 1
          },
          "detail": {
            "type": "string",
            "minLength": 1
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          }
        },
        "required": [
          "eventId",
          "applicationId",
          "sequence",
          "kind",
          "actor",
          "detail",
          "occurredAt"
        ],
        "additionalProperties": false
      },
      "DecisionTrace": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "applicationId": {
            "type": "string",
            "minLength": 1
          },
          "decisionId": {
            "type": "string",
            "minLength": 1
          },
          "application": {
            "type": "object",
            "properties": {
              "applicationId": {
                "type": "string",
                "minLength": 1
              },
              "product": {
                "type": "string",
                "enum": [
                  "personal_loan",
                  "auto_loan",
                  "ev_loan"
                ]
              },
              "applicant": {
                "type": "object",
                "properties": {
                  "applicantId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "displayName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "state": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "applicantId",
                  "displayName",
                  "state"
                ],
                "additionalProperties": false
              },
              "requestedAmount": {
                "type": "number",
                "exclusiveMinimum": 0
              },
              "requestedTermMonths": {
                "type": "integer",
                "exclusiveMinimum": 0,
                "maximum": 9007199254740991
              },
              "collateral": {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "enum": [
                      "none",
                      "vehicle",
                      "ev_battery",
                      "other"
                    ]
                  },
                  "descriptor": {
                    "type": "string",
                    "minLength": 1
                  },
                  "statedValue": {
                    "type": "number",
                    "minimum": 0
                  }
                },
                "required": [
                  "kind",
                  "descriptor"
                ],
                "additionalProperties": false
              },
              "documents": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "documentId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "pay_stub",
                        "bank_statement",
                        "id_document",
                        "vehicle_title",
                        "other"
                      ]
                    },
                    "filename": {
                      "type": "string",
                      "minLength": 1
                    },
                    "received": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "documentId",
                    "kind",
                    "filename",
                    "received"
                  ],
                  "additionalProperties": false
                }
              },
              "status": {
                "type": "string",
                "enum": [
                  "received",
                  "processing",
                  "decided",
                  "referred"
                ]
              },
              "submittedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "suppliedFacts": {
                "type": "object",
                "properties": {
                  "creditScore": {
                    "type": "integer",
                    "minimum": 300,
                    "maximum": 850
                  },
                  "dti": {
                    "type": "number",
                    "minimum": 0
                  },
                  "monthlyIncome": {
                    "type": "number",
                    "minimum": 0
                  },
                  "requestedAmount": {
                    "type": "number",
                    "minimum": 0
                  },
                  "requestedTermMonths": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "identityVerified": {
                    "type": "boolean"
                  },
                  "fraudRisk": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "collateralValue": {
                    "type": "number",
                    "minimum": 0
                  },
                  "ltv": {
                    "type": "number",
                    "minimum": 0
                  },
                  "nsfCount90d": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "derogatories": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "additionalProperties": false
              }
            },
            "required": [
              "applicationId",
              "product",
              "applicant",
              "requestedAmount",
              "requestedTermMonths",
              "documents",
              "status",
              "submittedAt"
            ],
            "additionalProperties": false
          },
          "agentOutputs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "agent": {
                  "type": "string",
                  "enum": [
                    "intake",
                    "identity_fraud",
                    "income",
                    "credit",
                    "collateral",
                    "policy",
                    "decision"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "ok",
                    "flag",
                    "error"
                  ]
                },
                "summary": {
                  "type": "string",
                  "minLength": 1
                },
                "data": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "string"
                  }
                },
                "mocks": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "provider": {
                        "type": "string",
                        "minLength": 1
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "mock",
                          "partial",
                          "real"
                        ]
                      },
                      "note": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "provider",
                      "status",
                      "note"
                    ],
                    "additionalProperties": false
                  }
                },
                "startedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "finishedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                }
              },
              "required": [
                "agent",
                "status",
                "summary",
                "data",
                "mocks",
                "startedAt",
                "finishedAt"
              ],
              "additionalProperties": false
            }
          },
          "decision": {
            "type": "object",
            "properties": {
              "decisionId": {
                "type": "string",
                "minLength": 1
              },
              "applicationId": {
                "type": "string",
                "minLength": 1
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "approve",
                  "decline",
                  "refer"
                ]
              },
              "pricing": {
                "type": "object",
                "properties": {
                  "apr": {
                    "type": "number",
                    "minimum": 0
                  },
                  "amount": {
                    "type": "number",
                    "exclusiveMinimum": 0
                  },
                  "termMonths": {
                    "type": "integer",
                    "exclusiveMinimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "apr",
                  "amount",
                  "termMonths"
                ],
                "additionalProperties": false
              },
              "reasonCodes": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "minLength": 1
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1
                    },
                    "detail": {
                      "type": "string",
                      "minLength": 1
                    },
                    "groundedInClauseIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "groundedInFacts": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "code",
                    "label",
                    "detail",
                    "groundedInClauseIds",
                    "groundedInFacts"
                  ],
                  "additionalProperties": false
                }
              },
              "confidence": {
                "type": "object",
                "properties": {
                  "score": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "level": {
                    "type": "string",
                    "enum": [
                      "low",
                      "medium",
                      "high"
                    ]
                  }
                },
                "required": [
                  "score",
                  "level"
                ],
                "additionalProperties": false
              },
              "shadow": {
                "type": "object",
                "properties": {
                  "outcome": {
                    "type": "string",
                    "enum": [
                      "approve",
                      "decline",
                      "refer"
                    ]
                  },
                  "score": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "agreesWithDecision": {
                    "type": "boolean"
                  },
                  "note": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "outcome",
                  "score",
                  "agreesWithDecision",
                  "note"
                ],
                "additionalProperties": false
              },
              "decidedBy": {
                "type": "string",
                "minLength": 1
              },
              "modelVersion": {
                "type": "string",
                "minLength": 1
              },
              "policyVersion": {
                "type": "string",
                "minLength": 1
              },
              "providerVersions": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "string"
                }
              },
              "mocks": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "provider": {
                      "type": "string",
                      "minLength": 1
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "mock",
                        "partial",
                        "real"
                      ]
                    },
                    "note": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "provider",
                    "status",
                    "note"
                  ],
                  "additionalProperties": false
                }
              },
              "decidedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "llmTranscript": {
                "type": "object",
                "properties": {
                  "schemaVersion": {
                    "type": "integer",
                    "minimum": -9007199254740991,
                    "maximum": 9007199254740991
                  },
                  "modelId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "exchanges": {
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "request": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        },
                        "response": {
                          "type": "object",
                          "propertyNames": {
                            "type": "string"
                          },
                          "additionalProperties": {}
                        }
                      },
                      "required": [
                        "request",
                        "response"
                      ],
                      "additionalProperties": false
                    }
                  }
                },
                "required": [
                  "schemaVersion",
                  "modelId",
                  "exchanges"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "decisionId",
              "applicationId",
              "outcome",
              "reasonCodes",
              "confidence",
              "decidedBy",
              "modelVersion",
              "policyVersion",
              "providerVersions",
              "mocks",
              "decidedAt"
            ],
            "additionalProperties": false
          },
          "auditEventIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "policyVersion": {
            "type": "string",
            "minLength": 1
          },
          "modelVersion": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "applicationId",
          "decisionId",
          "application",
          "agentOutputs",
          "decision",
          "auditEventIds",
          "policyVersion",
          "modelVersion"
        ],
        "additionalProperties": false
      },
      "ApplicationSummary": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "applicationId": {
            "type": "string",
            "minLength": 1
          },
          "applicantName": {
            "type": "string",
            "minLength": 1
          },
          "product": {
            "type": "string",
            "enum": [
              "personal_loan",
              "auto_loan",
              "ev_loan"
            ]
          },
          "outcome": {
            "type": "string",
            "enum": [
              "approve",
              "decline",
              "refer"
            ]
          },
          "confidenceLevel": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ]
          },
          "requestedAmount": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "submittedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "decidedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "reviewStatus": {
            "type": "string",
            "enum": [
              "auto_decided",
              "pending_review",
              "reviewed"
            ]
          },
          "overrideOutcome": {
            "type": "string",
            "enum": [
              "approve",
              "decline",
              "refer"
            ]
          }
        },
        "required": [
          "applicationId",
          "applicantName",
          "product",
          "outcome",
          "confidenceLevel",
          "requestedAmount",
          "submittedAt",
          "decidedAt"
        ],
        "additionalProperties": false
      },
      "ApplicationListResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "applications": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "applicationId": {
                  "type": "string",
                  "minLength": 1
                },
                "applicantName": {
                  "type": "string",
                  "minLength": 1
                },
                "product": {
                  "type": "string",
                  "enum": [
                    "personal_loan",
                    "auto_loan",
                    "ev_loan"
                  ]
                },
                "outcome": {
                  "type": "string",
                  "enum": [
                    "approve",
                    "decline",
                    "refer"
                  ]
                },
                "confidenceLevel": {
                  "type": "string",
                  "enum": [
                    "low",
                    "medium",
                    "high"
                  ]
                },
                "requestedAmount": {
                  "type": "number",
                  "exclusiveMinimum": 0
                },
                "submittedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "decidedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "reviewStatus": {
                  "type": "string",
                  "enum": [
                    "auto_decided",
                    "pending_review",
                    "reviewed"
                  ]
                },
                "overrideOutcome": {
                  "type": "string",
                  "enum": [
                    "approve",
                    "decline",
                    "refer"
                  ]
                }
              },
              "required": [
                "applicationId",
                "applicantName",
                "product",
                "outcome",
                "confidenceLevel",
                "requestedAmount",
                "submittedAt",
                "decidedAt"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "applications"
        ],
        "additionalProperties": false
      },
      "ApplicationAuditList": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "events": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "eventId": {
                  "type": "string",
                  "minLength": 1
                },
                "applicationId": {
                  "type": "string",
                  "minLength": 1
                },
                "sequence": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "application_received",
                    "agent_started",
                    "tool_called",
                    "agent_finished",
                    "decision_rendered",
                    "routed_to_human",
                    "notice_generated"
                  ]
                },
                "actor": {
                  "type": "string",
                  "minLength": 1
                },
                "detail": {
                  "type": "string",
                  "minLength": 1
                },
                "occurredAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                }
              },
              "required": [
                "eventId",
                "applicationId",
                "sequence",
                "kind",
                "actor",
                "detail",
                "occurredAt"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "events"
        ],
        "additionalProperties": false
      },
      "ReplayResult": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "applicationId": {
            "type": "string",
            "minLength": 1
          },
          "replayedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "decisionPath": {
            "type": "string",
            "enum": [
              "deterministic",
              "llm"
            ]
          },
          "factsReproduced": {
            "type": "boolean"
          },
          "knockoutReproduced": {
            "type": "boolean"
          },
          "shadowReproduced": {
            "type": "boolean"
          },
          "decisionReproduced": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "faithfulnessReVerified": {
            "type": "boolean"
          },
          "mismatchedFields": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "applicationId",
          "replayedAt",
          "decisionPath",
          "factsReproduced",
          "knockoutReproduced",
          "shadowReproduced",
          "decisionReproduced",
          "faithfulnessReVerified",
          "mismatchedFields",
          "notes"
        ],
        "additionalProperties": false
      },
      "GroupResult": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "group": {
            "type": "string",
            "minLength": 1
          },
          "count": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "maximum": 9007199254740991
          },
          "favorableCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "selectionRate": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          }
        },
        "required": [
          "group",
          "count",
          "favorableCount",
          "selectionRate"
        ],
        "additionalProperties": false
      },
      "AdverseImpactRatio": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "group": {
            "type": "string",
            "minLength": 1
          },
          "ratio": {
            "type": "number",
            "minimum": 0
          },
          "passesFourFifths": {
            "type": "boolean"
          }
        },
        "required": [
          "group",
          "ratio",
          "passesFourFifths"
        ],
        "additionalProperties": false
      },
      "ProxyFinding": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "feature": {
            "type": "string",
            "minLength": 1
          },
          "association": {
            "type": "string",
            "minLength": 1
          },
          "note": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "feature",
          "association",
          "note"
        ],
        "additionalProperties": false
      },
      "FairnessReport": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "generatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "sampleSize": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "groups": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "group": {
                  "type": "string",
                  "minLength": 1
                },
                "count": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "favorableCount": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "selectionRate": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                }
              },
              "required": [
                "group",
                "count",
                "favorableCount",
                "selectionRate"
              ],
              "additionalProperties": false
            }
          },
          "mostFavoredGroup": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "adverseImpactRatios": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "group": {
                  "type": "string",
                  "minLength": 1
                },
                "ratio": {
                  "type": "number",
                  "minimum": 0
                },
                "passesFourFifths": {
                  "type": "boolean"
                }
              },
              "required": [
                "group",
                "ratio",
                "passesFourFifths"
              ],
              "additionalProperties": false
            }
          },
          "fourFifthsPass": {
            "type": "boolean"
          },
          "proxyFindings": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "feature": {
                  "type": "string",
                  "minLength": 1
                },
                "association": {
                  "type": "string",
                  "minLength": 1
                },
                "note": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "feature",
                "association",
                "note"
              ],
              "additionalProperties": false
            }
          },
          "methodology": {
            "type": "string",
            "minLength": 1
          },
          "caveats": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "statisticallySufficient": {
            "type": "boolean"
          }
        },
        "required": [
          "generatedAt",
          "sampleSize",
          "groups",
          "mostFavoredGroup",
          "adverseImpactRatios",
          "fourFifthsPass",
          "proxyFindings",
          "methodology",
          "caveats",
          "statisticallySufficient"
        ],
        "additionalProperties": false
      },
      "ReviewItem": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "applicationId": {
            "type": "string",
            "minLength": 1
          },
          "applicantName": {
            "type": "string",
            "minLength": 1
          },
          "product": {
            "type": "string",
            "enum": [
              "personal_loan",
              "auto_loan",
              "ev_loan"
            ]
          },
          "outcome": {
            "type": "string",
            "enum": [
              "approve",
              "decline",
              "refer"
            ]
          },
          "confidenceLevel": {
            "type": "string",
            "enum": [
              "low",
              "medium",
              "high"
            ]
          },
          "reviewReason": {
            "type": "string",
            "minLength": 1
          },
          "submittedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "decidedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "assignedTo": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "dueAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "normal",
              "high",
              "urgent"
            ]
          },
          "breached": {
            "type": "boolean"
          }
        },
        "required": [
          "applicationId",
          "applicantName",
          "product",
          "outcome",
          "confidenceLevel",
          "reviewReason",
          "submittedAt",
          "decidedAt",
          "assignedTo",
          "dueAt",
          "priority",
          "breached"
        ],
        "additionalProperties": false
      },
      "ReviewQueueResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "reviews": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "applicationId": {
                  "type": "string",
                  "minLength": 1
                },
                "applicantName": {
                  "type": "string",
                  "minLength": 1
                },
                "product": {
                  "type": "string",
                  "enum": [
                    "personal_loan",
                    "auto_loan",
                    "ev_loan"
                  ]
                },
                "outcome": {
                  "type": "string",
                  "enum": [
                    "approve",
                    "decline",
                    "refer"
                  ]
                },
                "confidenceLevel": {
                  "type": "string",
                  "enum": [
                    "low",
                    "medium",
                    "high"
                  ]
                },
                "reviewReason": {
                  "type": "string",
                  "minLength": 1
                },
                "submittedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "decidedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "assignedTo": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "dueAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "priority": {
                  "type": "string",
                  "enum": [
                    "low",
                    "normal",
                    "high",
                    "urgent"
                  ]
                },
                "breached": {
                  "type": "boolean"
                }
              },
              "required": [
                "applicationId",
                "applicantName",
                "product",
                "outcome",
                "confidenceLevel",
                "reviewReason",
                "submittedAt",
                "decidedAt",
                "assignedTo",
                "dueAt",
                "priority",
                "breached"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "reviews"
        ],
        "additionalProperties": false
      },
      "HumanReviewRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "action": {
            "type": "string",
            "enum": [
              "affirm",
              "override"
            ]
          },
          "overrideOutcome": {
            "type": "string",
            "enum": [
              "approve",
              "decline",
              "refer"
            ]
          },
          "note": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "action",
          "note"
        ],
        "additionalProperties": false
      },
      "ContestRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "reason": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "reason"
        ],
        "additionalProperties": false
      },
      "ReviewRecord": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "applicationId": {
            "type": "string",
            "minLength": 1
          },
          "reviewStatus": {
            "type": "string",
            "enum": [
              "auto_decided",
              "pending_review",
              "reviewed"
            ]
          },
          "action": {
            "type": "string",
            "enum": [
              "affirm",
              "override"
            ]
          },
          "overrideOutcome": {
            "type": "string",
            "enum": [
              "approve",
              "decline",
              "refer"
            ]
          },
          "reviewedBy": {
            "type": "string",
            "minLength": 1
          },
          "reviewedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "note": {
            "type": "string",
            "minLength": 1
          },
          "contestReason": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "applicationId",
          "reviewStatus"
        ],
        "additionalProperties": false
      },
      "CaseActivity": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "applicationId": {
            "type": "string",
            "minLength": 1
          },
          "actor": {
            "type": "string"
          },
          "kind": {
            "type": "string",
            "minLength": 1
          },
          "detail": {
            "type": "string"
          },
          "occurredAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          }
        },
        "required": [
          "id",
          "applicationId",
          "actor",
          "kind",
          "detail",
          "occurredAt"
        ],
        "additionalProperties": false
      },
      "CaseActivityList": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "activity": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "applicationId": {
                  "type": "string",
                  "minLength": 1
                },
                "actor": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "minLength": 1
                },
                "detail": {
                  "type": "string"
                },
                "occurredAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                }
              },
              "required": [
                "id",
                "applicationId",
                "actor",
                "kind",
                "detail",
                "occurredAt"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "activity"
        ],
        "additionalProperties": false
      },
      "AssignCaseRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "assignee": {
            "type": "string",
            "minLength": 1
          },
          "dueAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "priority": {
            "type": "string",
            "enum": [
              "low",
              "normal",
              "high",
              "urgent"
            ]
          }
        },
        "required": [
          "assignee"
        ],
        "additionalProperties": false
      },
      "CaseNoteRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "note": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "note"
        ],
        "additionalProperties": false
      },
      "OutcomeBreakdown": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "rate": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          }
        },
        "required": [
          "count",
          "rate"
        ],
        "additionalProperties": false
      },
      "OutcomeCounts": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "approve": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "rate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            },
            "required": [
              "count",
              "rate"
            ],
            "additionalProperties": false
          },
          "refer": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "rate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            },
            "required": [
              "count",
              "rate"
            ],
            "additionalProperties": false
          },
          "decline": {
            "type": "object",
            "properties": {
              "count": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "rate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            },
            "required": [
              "count",
              "rate"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "approve",
          "refer",
          "decline"
        ],
        "additionalProperties": false
      },
      "ProductOutcomeMix": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "product": {
            "type": "string",
            "enum": [
              "personal_loan",
              "auto_loan",
              "ev_loan"
            ]
          },
          "totalDecisions": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "byOutcome": {
            "type": "object",
            "properties": {
              "approve": {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "rate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  }
                },
                "required": [
                  "count",
                  "rate"
                ],
                "additionalProperties": false
              },
              "refer": {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "rate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  }
                },
                "required": [
                  "count",
                  "rate"
                ],
                "additionalProperties": false
              },
              "decline": {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "rate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  }
                },
                "required": [
                  "count",
                  "rate"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "approve",
              "refer",
              "decline"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "product",
          "totalDecisions",
          "byOutcome"
        ],
        "additionalProperties": false
      },
      "ConfidenceDistribution": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "low": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "medium": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "high": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "low",
          "medium",
          "high"
        ],
        "additionalProperties": false
      },
      "ShadowAgreement": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "evaluated": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "agreed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "agreementRate": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          }
        },
        "required": [
          "evaluated",
          "agreed",
          "agreementRate"
        ],
        "additionalProperties": false
      },
      "DecisionTimeBucket": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "bucketStart": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "totalDecisions": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "byOutcome": {
            "type": "object",
            "properties": {
              "approve": {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "rate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  }
                },
                "required": [
                  "count",
                  "rate"
                ],
                "additionalProperties": false
              },
              "refer": {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "rate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  }
                },
                "required": [
                  "count",
                  "rate"
                ],
                "additionalProperties": false
              },
              "decline": {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "rate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  }
                },
                "required": [
                  "count",
                  "rate"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "approve",
              "refer",
              "decline"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "bucketStart",
          "totalDecisions",
          "byOutcome"
        ],
        "additionalProperties": false
      },
      "DecisionAnalytics": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "generatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "windowDays": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "product": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "personal_loan",
                  "auto_loan",
                  "ev_loan"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "totalDecisions": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "byOutcome": {
            "type": "object",
            "properties": {
              "approve": {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "rate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  }
                },
                "required": [
                  "count",
                  "rate"
                ],
                "additionalProperties": false
              },
              "refer": {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "rate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  }
                },
                "required": [
                  "count",
                  "rate"
                ],
                "additionalProperties": false
              },
              "decline": {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "rate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  }
                },
                "required": [
                  "count",
                  "rate"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "approve",
              "refer",
              "decline"
            ],
            "additionalProperties": false
          },
          "byProduct": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "product": {
                  "type": "string",
                  "enum": [
                    "personal_loan",
                    "auto_loan",
                    "ev_loan"
                  ]
                },
                "totalDecisions": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "byOutcome": {
                  "type": "object",
                  "properties": {
                    "approve": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "rate": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1
                        }
                      },
                      "required": [
                        "count",
                        "rate"
                      ],
                      "additionalProperties": false
                    },
                    "refer": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "rate": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1
                        }
                      },
                      "required": [
                        "count",
                        "rate"
                      ],
                      "additionalProperties": false
                    },
                    "decline": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "rate": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1
                        }
                      },
                      "required": [
                        "count",
                        "rate"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "approve",
                    "refer",
                    "decline"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "product",
                "totalDecisions",
                "byOutcome"
              ],
              "additionalProperties": false
            }
          },
          "confidenceDistribution": {
            "type": "object",
            "properties": {
              "low": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "medium": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "high": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "low",
              "medium",
              "high"
            ],
            "additionalProperties": false
          },
          "shadowAgreement": {
            "type": "object",
            "properties": {
              "evaluated": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "agreed": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "agreementRate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            },
            "required": [
              "evaluated",
              "agreed",
              "agreementRate"
            ],
            "additionalProperties": false
          },
          "timeSeries": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "bucketStart": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "totalDecisions": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "byOutcome": {
                  "type": "object",
                  "properties": {
                    "approve": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "rate": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1
                        }
                      },
                      "required": [
                        "count",
                        "rate"
                      ],
                      "additionalProperties": false
                    },
                    "refer": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "rate": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1
                        }
                      },
                      "required": [
                        "count",
                        "rate"
                      ],
                      "additionalProperties": false
                    },
                    "decline": {
                      "type": "object",
                      "properties": {
                        "count": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "rate": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1
                        }
                      },
                      "required": [
                        "count",
                        "rate"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "approve",
                    "refer",
                    "decline"
                  ],
                  "additionalProperties": false
                }
              },
              "required": [
                "bucketStart",
                "totalDecisions",
                "byOutcome"
              ],
              "additionalProperties": false
            }
          },
          "outcomeBasis": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "generatedAt",
          "windowDays",
          "product",
          "totalDecisions",
          "byOutcome",
          "byProduct",
          "confidenceDistribution",
          "shadowAgreement",
          "timeSeries",
          "outcomeBasis"
        ],
        "additionalProperties": false
      },
      "DecisionDriftWindow": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "totalDecisions": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "approvalRate": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "confidenceMix": {
            "type": "object",
            "properties": {
              "low": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "medium": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "high": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "low",
              "medium",
              "high"
            ],
            "additionalProperties": false
          },
          "shadowDivergenceRate": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          }
        },
        "required": [
          "totalDecisions",
          "approvalRate",
          "confidenceMix",
          "shadowDivergenceRate"
        ],
        "additionalProperties": false
      },
      "DecisionDrift": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "generatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "windowDays": {
            "type": "integer",
            "minimum": 1,
            "maximum": 9007199254740991
          },
          "product": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "personal_loan",
                  "auto_loan",
                  "ev_loan"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "recent": {
            "type": "object",
            "properties": {
              "totalDecisions": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "approvalRate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "confidenceMix": {
                "type": "object",
                "properties": {
                  "low": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "medium": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "high": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "low",
                  "medium",
                  "high"
                ],
                "additionalProperties": false
              },
              "shadowDivergenceRate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            },
            "required": [
              "totalDecisions",
              "approvalRate",
              "confidenceMix",
              "shadowDivergenceRate"
            ],
            "additionalProperties": false
          },
          "prior": {
            "type": "object",
            "properties": {
              "totalDecisions": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "approvalRate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "confidenceMix": {
                "type": "object",
                "properties": {
                  "low": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "medium": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "high": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  }
                },
                "required": [
                  "low",
                  "medium",
                  "high"
                ],
                "additionalProperties": false
              },
              "shadowDivergenceRate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            },
            "required": [
              "totalDecisions",
              "approvalRate",
              "confidenceMix",
              "shadowDivergenceRate"
            ],
            "additionalProperties": false
          },
          "approvalRateDelta": {
            "type": "number",
            "minimum": -1,
            "maximum": 1
          },
          "shadowDivergenceDelta": {
            "type": "number",
            "minimum": -1,
            "maximum": 1
          },
          "populationShiftFlag": {
            "type": "boolean"
          },
          "sufficient": {
            "type": "boolean"
          },
          "note": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "generatedAt",
          "windowDays",
          "product",
          "recent",
          "prior",
          "approvalRateDelta",
          "shadowDivergenceDelta",
          "populationShiftFlag",
          "sufficient",
          "note"
        ],
        "additionalProperties": false
      },
      "BacktestOutcomeBreakdown": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "population": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "approve": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "refer": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "decline": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "approveRate": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "referRate": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "declineRate": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          }
        },
        "required": [
          "population",
          "approve",
          "refer",
          "decline",
          "approveRate",
          "referRate",
          "declineRate"
        ],
        "additionalProperties": false
      },
      "FlippedApplication": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "applicationId": {
            "type": "string",
            "minLength": 1
          },
          "fromOutcome": {
            "type": "string",
            "enum": [
              "approve",
              "decline",
              "refer"
            ]
          },
          "toOutcome": {
            "type": "string",
            "enum": [
              "approve",
              "decline",
              "refer"
            ]
          },
          "basis": {
            "type": "string",
            "enum": [
              "deterministic",
              "estimated"
            ]
          }
        },
        "required": [
          "applicationId",
          "fromOutcome",
          "toOutcome",
          "basis"
        ],
        "additionalProperties": false
      },
      "BacktestReport": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "candidateProduct": {
            "type": "string",
            "minLength": 1
          },
          "candidatePolicyVersion": {
            "type": "string",
            "minLength": 1
          },
          "population": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "current": {
            "type": "object",
            "properties": {
              "population": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "approve": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "refer": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "decline": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "approveRate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "referRate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "declineRate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            },
            "required": [
              "population",
              "approve",
              "refer",
              "decline",
              "approveRate",
              "referRate",
              "declineRate"
            ],
            "additionalProperties": false
          },
          "candidate": {
            "type": "object",
            "properties": {
              "population": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "approve": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "refer": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "decline": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "approveRate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "referRate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "declineRate": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              }
            },
            "required": [
              "population",
              "approve",
              "refer",
              "decline",
              "approveRate",
              "referRate",
              "declineRate"
            ],
            "additionalProperties": false
          },
          "flipped": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "applicationId": {
                  "type": "string",
                  "minLength": 1
                },
                "fromOutcome": {
                  "type": "string",
                  "enum": [
                    "approve",
                    "decline",
                    "refer"
                  ]
                },
                "toOutcome": {
                  "type": "string",
                  "enum": [
                    "approve",
                    "decline",
                    "refer"
                  ]
                },
                "basis": {
                  "type": "string",
                  "enum": [
                    "deterministic",
                    "estimated"
                  ]
                }
              },
              "required": [
                "applicationId",
                "fromOutcome",
                "toOutcome",
                "basis"
              ],
              "additionalProperties": false
            }
          },
          "deterministicCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "estimatedCount": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "notes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "candidateProduct",
          "candidatePolicyVersion",
          "population",
          "current",
          "candidate",
          "flipped",
          "deterministicCount",
          "estimatedCount",
          "notes"
        ],
        "additionalProperties": false
      },
      "BacktestRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "candidateProduct": {
            "type": "string",
            "minLength": 1
          },
          "candidateVersion": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "candidateProduct",
          "candidateVersion"
        ],
        "additionalProperties": false
      },
      "Experiment": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "tenantId": {
            "type": "string",
            "minLength": 1
          },
          "name": {
            "type": "string"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "running",
              "stopped"
            ]
          },
          "championProduct": {
            "type": "string"
          },
          "championVersion": {
            "type": "string"
          },
          "challengerProduct": {
            "type": "string"
          },
          "challengerVersion": {
            "type": "string"
          },
          "split": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "metric": {
            "type": "string"
          },
          "createdBy": {
            "type": "string"
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          }
        },
        "required": [
          "id",
          "tenantId",
          "name",
          "status",
          "championProduct",
          "championVersion",
          "challengerProduct",
          "challengerVersion",
          "split",
          "metric",
          "createdBy",
          "createdAt"
        ],
        "additionalProperties": false
      },
      "CreateExperimentRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "championProduct": {
            "type": "string",
            "minLength": 1
          },
          "championVersion": {
            "type": "string",
            "minLength": 1
          },
          "challengerProduct": {
            "type": "string",
            "minLength": 1
          },
          "challengerVersion": {
            "type": "string",
            "minLength": 1
          },
          "split": {
            "type": "number",
            "minimum": 0,
            "maximum": 1
          },
          "metric": {
            "type": "string"
          }
        },
        "required": [
          "championProduct",
          "championVersion",
          "challengerProduct",
          "challengerVersion",
          "split"
        ],
        "additionalProperties": false
      },
      "ExperimentListResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "experiments": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "tenantId": {
                  "type": "string",
                  "minLength": 1
                },
                "name": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "draft",
                    "running",
                    "stopped"
                  ]
                },
                "championProduct": {
                  "type": "string"
                },
                "championVersion": {
                  "type": "string"
                },
                "challengerProduct": {
                  "type": "string"
                },
                "challengerVersion": {
                  "type": "string"
                },
                "split": {
                  "type": "number",
                  "minimum": 0,
                  "maximum": 1
                },
                "metric": {
                  "type": "string"
                },
                "createdBy": {
                  "type": "string"
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                }
              },
              "required": [
                "id",
                "tenantId",
                "name",
                "status",
                "championProduct",
                "championVersion",
                "challengerProduct",
                "challengerVersion",
                "split",
                "metric",
                "createdBy",
                "createdAt"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "experiments"
        ],
        "additionalProperties": false
      },
      "ExperimentArmLive": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "decisions": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "byOutcome": {
            "type": "object",
            "properties": {
              "approve": {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "rate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  }
                },
                "required": [
                  "count",
                  "rate"
                ],
                "additionalProperties": false
              },
              "refer": {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "rate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  }
                },
                "required": [
                  "count",
                  "rate"
                ],
                "additionalProperties": false
              },
              "decline": {
                "type": "object",
                "properties": {
                  "count": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "rate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  }
                },
                "required": [
                  "count",
                  "rate"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "approve",
              "refer",
              "decline"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "decisions",
          "byOutcome"
        ],
        "additionalProperties": false
      },
      "ExperimentLiveComparison": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "champion": {
            "type": "object",
            "properties": {
              "decisions": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "byOutcome": {
                "type": "object",
                "properties": {
                  "approve": {
                    "type": "object",
                    "properties": {
                      "count": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "rate": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      }
                    },
                    "required": [
                      "count",
                      "rate"
                    ],
                    "additionalProperties": false
                  },
                  "refer": {
                    "type": "object",
                    "properties": {
                      "count": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "rate": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      }
                    },
                    "required": [
                      "count",
                      "rate"
                    ],
                    "additionalProperties": false
                  },
                  "decline": {
                    "type": "object",
                    "properties": {
                      "count": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "rate": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      }
                    },
                    "required": [
                      "count",
                      "rate"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "approve",
                  "refer",
                  "decline"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "decisions",
              "byOutcome"
            ],
            "additionalProperties": false
          },
          "challenger": {
            "type": "object",
            "properties": {
              "decisions": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "byOutcome": {
                "type": "object",
                "properties": {
                  "approve": {
                    "type": "object",
                    "properties": {
                      "count": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "rate": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      }
                    },
                    "required": [
                      "count",
                      "rate"
                    ],
                    "additionalProperties": false
                  },
                  "refer": {
                    "type": "object",
                    "properties": {
                      "count": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "rate": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      }
                    },
                    "required": [
                      "count",
                      "rate"
                    ],
                    "additionalProperties": false
                  },
                  "decline": {
                    "type": "object",
                    "properties": {
                      "count": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "rate": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      }
                    },
                    "required": [
                      "count",
                      "rate"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "approve",
                  "refer",
                  "decline"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "decisions",
              "byOutcome"
            ],
            "additionalProperties": false
          },
          "challengerFallbacks": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "activelyRouting": {
            "type": "boolean"
          }
        },
        "required": [
          "champion",
          "challenger",
          "challengerFallbacks",
          "activelyRouting"
        ],
        "additionalProperties": false
      },
      "ExperimentComparison": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "experiment": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "tenantId": {
                "type": "string",
                "minLength": 1
              },
              "name": {
                "type": "string"
              },
              "status": {
                "type": "string",
                "enum": [
                  "draft",
                  "running",
                  "stopped"
                ]
              },
              "championProduct": {
                "type": "string"
              },
              "championVersion": {
                "type": "string"
              },
              "challengerProduct": {
                "type": "string"
              },
              "challengerVersion": {
                "type": "string"
              },
              "split": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "metric": {
                "type": "string"
              },
              "createdBy": {
                "type": "string"
              },
              "createdAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              }
            },
            "required": [
              "id",
              "tenantId",
              "name",
              "status",
              "championProduct",
              "championVersion",
              "challengerProduct",
              "challengerVersion",
              "split",
              "metric",
              "createdBy",
              "createdAt"
            ],
            "additionalProperties": false
          },
          "comparison": {
            "type": "object",
            "properties": {
              "candidateProduct": {
                "type": "string",
                "minLength": 1
              },
              "candidatePolicyVersion": {
                "type": "string",
                "minLength": 1
              },
              "population": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "current": {
                "type": "object",
                "properties": {
                  "population": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "approve": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "refer": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "decline": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "approveRate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "referRate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "declineRate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  }
                },
                "required": [
                  "population",
                  "approve",
                  "refer",
                  "decline",
                  "approveRate",
                  "referRate",
                  "declineRate"
                ],
                "additionalProperties": false
              },
              "candidate": {
                "type": "object",
                "properties": {
                  "population": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "approve": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "refer": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "decline": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "approveRate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "referRate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "declineRate": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  }
                },
                "required": [
                  "population",
                  "approve",
                  "refer",
                  "decline",
                  "approveRate",
                  "referRate",
                  "declineRate"
                ],
                "additionalProperties": false
              },
              "flipped": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "applicationId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "fromOutcome": {
                      "type": "string",
                      "enum": [
                        "approve",
                        "decline",
                        "refer"
                      ]
                    },
                    "toOutcome": {
                      "type": "string",
                      "enum": [
                        "approve",
                        "decline",
                        "refer"
                      ]
                    },
                    "basis": {
                      "type": "string",
                      "enum": [
                        "deterministic",
                        "estimated"
                      ]
                    }
                  },
                  "required": [
                    "applicationId",
                    "fromOutcome",
                    "toOutcome",
                    "basis"
                  ],
                  "additionalProperties": false
                }
              },
              "deterministicCount": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "estimatedCount": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "notes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "required": [
              "candidateProduct",
              "candidatePolicyVersion",
              "population",
              "current",
              "candidate",
              "flipped",
              "deterministicCount",
              "estimatedCount",
              "notes"
            ],
            "additionalProperties": false
          },
          "live": {
            "type": "object",
            "properties": {
              "champion": {
                "type": "object",
                "properties": {
                  "decisions": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "byOutcome": {
                    "type": "object",
                    "properties": {
                      "approve": {
                        "type": "object",
                        "properties": {
                          "count": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "rate": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1
                          }
                        },
                        "required": [
                          "count",
                          "rate"
                        ],
                        "additionalProperties": false
                      },
                      "refer": {
                        "type": "object",
                        "properties": {
                          "count": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "rate": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1
                          }
                        },
                        "required": [
                          "count",
                          "rate"
                        ],
                        "additionalProperties": false
                      },
                      "decline": {
                        "type": "object",
                        "properties": {
                          "count": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "rate": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1
                          }
                        },
                        "required": [
                          "count",
                          "rate"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "approve",
                      "refer",
                      "decline"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "decisions",
                  "byOutcome"
                ],
                "additionalProperties": false
              },
              "challenger": {
                "type": "object",
                "properties": {
                  "decisions": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  "byOutcome": {
                    "type": "object",
                    "properties": {
                      "approve": {
                        "type": "object",
                        "properties": {
                          "count": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "rate": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1
                          }
                        },
                        "required": [
                          "count",
                          "rate"
                        ],
                        "additionalProperties": false
                      },
                      "refer": {
                        "type": "object",
                        "properties": {
                          "count": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "rate": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1
                          }
                        },
                        "required": [
                          "count",
                          "rate"
                        ],
                        "additionalProperties": false
                      },
                      "decline": {
                        "type": "object",
                        "properties": {
                          "count": {
                            "type": "integer",
                            "minimum": 0,
                            "maximum": 9007199254740991
                          },
                          "rate": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1
                          }
                        },
                        "required": [
                          "count",
                          "rate"
                        ],
                        "additionalProperties": false
                      }
                    },
                    "required": [
                      "approve",
                      "refer",
                      "decline"
                    ],
                    "additionalProperties": false
                  }
                },
                "required": [
                  "decisions",
                  "byOutcome"
                ],
                "additionalProperties": false
              },
              "challengerFallbacks": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "activelyRouting": {
                "type": "boolean"
              }
            },
            "required": [
              "champion",
              "challenger",
              "challengerFallbacks",
              "activelyRouting"
            ],
            "additionalProperties": false
          },
          "note": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "experiment",
          "comparison",
          "live",
          "note"
        ],
        "additionalProperties": false
      },
      "OnboardingDocument": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "documentId": {
            "type": "string",
            "minLength": 1
          },
          "kind": {
            "type": "string",
            "enum": [
              "government_id",
              "proof_of_address",
              "incorporation_doc",
              "other"
            ]
          },
          "filename": {
            "type": "string",
            "minLength": 1
          },
          "received": {
            "type": "boolean"
          }
        },
        "required": [
          "documentId",
          "kind",
          "filename",
          "received"
        ],
        "additionalProperties": false
      },
      "OnboardingApplication": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "applicationId": {
            "type": "string",
            "minLength": 1
          },
          "applicant": {
            "type": "object",
            "properties": {
              "applicantId": {
                "type": "string",
                "minLength": 1
              },
              "displayName": {
                "type": "string",
                "minLength": 1
              },
              "state": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "applicantId",
              "displayName",
              "state"
            ],
            "additionalProperties": false
          },
          "accountType": {
            "type": "string",
            "enum": [
              "individual",
              "business",
              "joint"
            ]
          },
          "documents": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "documentId": {
                  "type": "string",
                  "minLength": 1
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "government_id",
                    "proof_of_address",
                    "incorporation_doc",
                    "other"
                  ]
                },
                "filename": {
                  "type": "string",
                  "minLength": 1
                },
                "received": {
                  "type": "boolean"
                }
              },
              "required": [
                "documentId",
                "kind",
                "filename",
                "received"
              ],
              "additionalProperties": false
            }
          },
          "submittedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          }
        },
        "required": [
          "applicationId",
          "applicant",
          "accountType",
          "documents",
          "submittedAt"
        ],
        "additionalProperties": false
      },
      "OnboardingFacts": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "identityVerified": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "fraudRisk": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "sanctionsHit": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "pepStatus": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "documentsValid": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          },
          "accountType": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "individual",
                  "business",
                  "joint"
                ]
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "identityVerified",
          "fraudRisk",
          "sanctionsHit",
          "pepStatus",
          "documentsValid",
          "accountType"
        ],
        "additionalProperties": false
      },
      "OnboardingDecision": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "decisionId": {
            "type": "string",
            "minLength": 1
          },
          "applicationId": {
            "type": "string",
            "minLength": 1
          },
          "useCase": {
            "type": "string",
            "enum": [
              "lending",
              "onboarding"
            ]
          },
          "outcome": {
            "type": "string",
            "enum": [
              "approve",
              "decline",
              "refer"
            ]
          },
          "reasonCodes": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "code": {
                  "type": "string",
                  "minLength": 1
                },
                "label": {
                  "type": "string",
                  "minLength": 1
                },
                "detail": {
                  "type": "string",
                  "minLength": 1
                },
                "groundedInClauseIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "groundedInFacts": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "code",
                "label",
                "detail",
                "groundedInClauseIds",
                "groundedInFacts"
              ],
              "additionalProperties": false
            }
          },
          "confidence": {
            "type": "object",
            "properties": {
              "score": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "level": {
                "type": "string",
                "enum": [
                  "low",
                  "medium",
                  "high"
                ]
              }
            },
            "required": [
              "score",
              "level"
            ],
            "additionalProperties": false
          },
          "shadow": {
            "type": "object",
            "properties": {
              "outcome": {
                "type": "string",
                "enum": [
                  "approve",
                  "decline",
                  "refer"
                ]
              },
              "score": {
                "type": "number",
                "minimum": 0,
                "maximum": 1
              },
              "agreesWithDecision": {
                "type": "boolean"
              },
              "note": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "outcome",
              "score",
              "agreesWithDecision",
              "note"
            ],
            "additionalProperties": false
          },
          "decidedBy": {
            "type": "string",
            "minLength": 1
          },
          "modelVersion": {
            "type": "string",
            "minLength": 1
          },
          "policyVersion": {
            "type": "string",
            "minLength": 1
          },
          "providerVersions": {
            "type": "object",
            "propertyNames": {
              "type": "string"
            },
            "additionalProperties": {
              "type": "string"
            }
          },
          "mocks": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "provider": {
                  "type": "string",
                  "minLength": 1
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "mock",
                    "partial",
                    "real"
                  ]
                },
                "note": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "provider",
                "status",
                "note"
              ],
              "additionalProperties": false
            }
          },
          "decidedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          }
        },
        "required": [
          "decisionId",
          "applicationId",
          "useCase",
          "outcome",
          "reasonCodes",
          "confidence",
          "decidedBy",
          "modelVersion",
          "policyVersion",
          "providerVersions",
          "mocks",
          "decidedAt"
        ],
        "additionalProperties": false
      },
      "OnboardingDetermination": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "applicationId": {
            "type": "string",
            "minLength": 1
          },
          "decisionId": {
            "type": "string",
            "minLength": 1
          },
          "determinationType": {
            "type": "string",
            "enum": [
              "identity_not_verified",
              "sanctions_match",
              "pep_review",
              "fraud_review",
              "documentation_deficiency"
            ]
          },
          "basisReasons": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "statement": {
                  "type": "string",
                  "minLength": 1
                },
                "reasonCode": {
                  "type": "string",
                  "minLength": 1
                },
                "groundedInClauseIds": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "groundedInFacts": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              },
              "required": [
                "statement",
                "reasonCode",
                "groundedInClauseIds",
                "groundedInFacts"
              ],
              "additionalProperties": false
            }
          },
          "regulatoryBasis": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            }
          },
          "body": {
            "type": "string",
            "minLength": 1
          },
          "isCreditAdverseAction": {
            "type": "boolean",
            "const": false
          },
          "generatedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          }
        },
        "required": [
          "applicationId",
          "decisionId",
          "determinationType",
          "basisReasons",
          "regulatoryBasis",
          "body",
          "isCreditAdverseAction",
          "generatedAt"
        ],
        "additionalProperties": false
      },
      "OnboardingDecisionTrace": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "applicationId": {
            "type": "string",
            "minLength": 1
          },
          "decisionId": {
            "type": "string",
            "minLength": 1
          },
          "useCase": {
            "type": "string",
            "enum": [
              "lending",
              "onboarding"
            ]
          },
          "application": {
            "type": "object",
            "properties": {
              "applicationId": {
                "type": "string",
                "minLength": 1
              },
              "applicant": {
                "type": "object",
                "properties": {
                  "applicantId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "displayName": {
                    "type": "string",
                    "minLength": 1
                  },
                  "state": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "applicantId",
                  "displayName",
                  "state"
                ],
                "additionalProperties": false
              },
              "accountType": {
                "type": "string",
                "enum": [
                  "individual",
                  "business",
                  "joint"
                ]
              },
              "documents": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "documentId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "kind": {
                      "type": "string",
                      "enum": [
                        "government_id",
                        "proof_of_address",
                        "incorporation_doc",
                        "other"
                      ]
                    },
                    "filename": {
                      "type": "string",
                      "minLength": 1
                    },
                    "received": {
                      "type": "boolean"
                    }
                  },
                  "required": [
                    "documentId",
                    "kind",
                    "filename",
                    "received"
                  ],
                  "additionalProperties": false
                }
              },
              "submittedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              }
            },
            "required": [
              "applicationId",
              "applicant",
              "accountType",
              "documents",
              "submittedAt"
            ],
            "additionalProperties": false
          },
          "agentOutputs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "agent": {
                  "type": "string",
                  "enum": [
                    "intake",
                    "identity_fraud",
                    "income",
                    "credit",
                    "collateral",
                    "policy",
                    "decision"
                  ]
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "ok",
                    "flag",
                    "error"
                  ]
                },
                "summary": {
                  "type": "string",
                  "minLength": 1
                },
                "data": {
                  "type": "object",
                  "propertyNames": {
                    "type": "string"
                  },
                  "additionalProperties": {
                    "type": "string"
                  }
                },
                "mocks": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "provider": {
                        "type": "string",
                        "minLength": 1
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "mock",
                          "partial",
                          "real"
                        ]
                      },
                      "note": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "provider",
                      "status",
                      "note"
                    ],
                    "additionalProperties": false
                  }
                },
                "startedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "finishedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                }
              },
              "required": [
                "agent",
                "status",
                "summary",
                "data",
                "mocks",
                "startedAt",
                "finishedAt"
              ],
              "additionalProperties": false
            }
          },
          "decision": {
            "type": "object",
            "properties": {
              "decisionId": {
                "type": "string",
                "minLength": 1
              },
              "applicationId": {
                "type": "string",
                "minLength": 1
              },
              "useCase": {
                "type": "string",
                "enum": [
                  "lending",
                  "onboarding"
                ]
              },
              "outcome": {
                "type": "string",
                "enum": [
                  "approve",
                  "decline",
                  "refer"
                ]
              },
              "reasonCodes": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "minLength": 1
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1
                    },
                    "detail": {
                      "type": "string",
                      "minLength": 1
                    },
                    "groundedInClauseIds": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    },
                    "groundedInFacts": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      }
                    }
                  },
                  "required": [
                    "code",
                    "label",
                    "detail",
                    "groundedInClauseIds",
                    "groundedInFacts"
                  ],
                  "additionalProperties": false
                }
              },
              "confidence": {
                "type": "object",
                "properties": {
                  "score": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "level": {
                    "type": "string",
                    "enum": [
                      "low",
                      "medium",
                      "high"
                    ]
                  }
                },
                "required": [
                  "score",
                  "level"
                ],
                "additionalProperties": false
              },
              "shadow": {
                "type": "object",
                "properties": {
                  "outcome": {
                    "type": "string",
                    "enum": [
                      "approve",
                      "decline",
                      "refer"
                    ]
                  },
                  "score": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  "agreesWithDecision": {
                    "type": "boolean"
                  },
                  "note": {
                    "type": "string",
                    "minLength": 1
                  }
                },
                "required": [
                  "outcome",
                  "score",
                  "agreesWithDecision",
                  "note"
                ],
                "additionalProperties": false
              },
              "decidedBy": {
                "type": "string",
                "minLength": 1
              },
              "modelVersion": {
                "type": "string",
                "minLength": 1
              },
              "policyVersion": {
                "type": "string",
                "minLength": 1
              },
              "providerVersions": {
                "type": "object",
                "propertyNames": {
                  "type": "string"
                },
                "additionalProperties": {
                  "type": "string"
                }
              },
              "mocks": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "provider": {
                      "type": "string",
                      "minLength": 1
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "mock",
                        "partial",
                        "real"
                      ]
                    },
                    "note": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "provider",
                    "status",
                    "note"
                  ],
                  "additionalProperties": false
                }
              },
              "decidedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              }
            },
            "required": [
              "decisionId",
              "applicationId",
              "useCase",
              "outcome",
              "reasonCodes",
              "confidence",
              "decidedBy",
              "modelVersion",
              "policyVersion",
              "providerVersions",
              "mocks",
              "decidedAt"
            ],
            "additionalProperties": false
          },
          "determination": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "applicationId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "decisionId": {
                    "type": "string",
                    "minLength": 1
                  },
                  "determinationType": {
                    "type": "string",
                    "enum": [
                      "identity_not_verified",
                      "sanctions_match",
                      "pep_review",
                      "fraud_review",
                      "documentation_deficiency"
                    ]
                  },
                  "basisReasons": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "statement": {
                          "type": "string",
                          "minLength": 1
                        },
                        "reasonCode": {
                          "type": "string",
                          "minLength": 1
                        },
                        "groundedInClauseIds": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        },
                        "groundedInFacts": {
                          "type": "array",
                          "items": {
                            "type": "string"
                          }
                        }
                      },
                      "required": [
                        "statement",
                        "reasonCode",
                        "groundedInClauseIds",
                        "groundedInFacts"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "regulatoryBasis": {
                    "minItems": 1,
                    "type": "array",
                    "items": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "body": {
                    "type": "string",
                    "minLength": 1
                  },
                  "isCreditAdverseAction": {
                    "type": "boolean",
                    "const": false
                  },
                  "generatedAt": {
                    "type": "string",
                    "format": "date-time",
                    "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                  }
                },
                "required": [
                  "applicationId",
                  "decisionId",
                  "determinationType",
                  "basisReasons",
                  "regulatoryBasis",
                  "body",
                  "isCreditAdverseAction",
                  "generatedAt"
                ],
                "additionalProperties": false
              },
              {
                "type": "null"
              }
            ]
          },
          "auditEventIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "policyVersion": {
            "type": "string",
            "minLength": 1
          },
          "modelVersion": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "applicationId",
          "decisionId",
          "useCase",
          "application",
          "agentOutputs",
          "decision",
          "determination",
          "auditEventIds",
          "policyVersion",
          "modelVersion"
        ],
        "additionalProperties": false
      },
      "CertificateSnapshot": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "grade": {
            "type": "string",
            "enum": [
              "A",
              "B",
              "C",
              "D",
              "F"
            ]
          },
          "confidence": {
            "type": "string",
            "enum": [
              "high",
              "medium",
              "low"
            ]
          },
          "sohBand": {
            "type": "object",
            "properties": {
              "p10": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "p50": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "p90": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              }
            },
            "required": [
              "p10",
              "p50",
              "p90"
            ],
            "additionalProperties": false
          },
          "chemistry": {
            "type": "string",
            "enum": [
              "LFP",
              "NMC"
            ]
          },
          "segment": {
            "type": "string",
            "enum": [
              "2W",
              "3W",
              "COMMERCIAL",
              "4W"
            ]
          },
          "modelVersion": {
            "type": "string",
            "minLength": 1
          },
          "issuerName": {
            "type": "string",
            "minLength": 1
          },
          "packDisplay": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "grade",
          "confidence",
          "sohBand",
          "chemistry",
          "segment",
          "modelVersion",
          "issuerName",
          "packDisplay"
        ],
        "additionalProperties": false
      },
      "BatteryCertificate": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "token": {
            "type": "string",
            "minLength": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "revoked",
              "expired"
            ]
          },
          "packId": {
            "type": "string",
            "pattern": "^[0-9A-Z]{21}$"
          },
          "issuedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "revokedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "revokeReason": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ]
          },
          "snapshot": {
            "type": "object",
            "properties": {
              "grade": {
                "type": "string",
                "enum": [
                  "A",
                  "B",
                  "C",
                  "D",
                  "F"
                ]
              },
              "confidence": {
                "type": "string",
                "enum": [
                  "high",
                  "medium",
                  "low"
                ]
              },
              "sohBand": {
                "type": "object",
                "properties": {
                  "p10": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "p50": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "p90": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  }
                },
                "required": [
                  "p10",
                  "p50",
                  "p90"
                ],
                "additionalProperties": false
              },
              "chemistry": {
                "type": "string",
                "enum": [
                  "LFP",
                  "NMC"
                ]
              },
              "segment": {
                "type": "string",
                "enum": [
                  "2W",
                  "3W",
                  "COMMERCIAL",
                  "4W"
                ]
              },
              "modelVersion": {
                "type": "string",
                "minLength": 1
              },
              "issuerName": {
                "type": "string",
                "minLength": 1
              },
              "packDisplay": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "grade",
              "confidence",
              "sohBand",
              "chemistry",
              "segment",
              "modelVersion",
              "issuerName",
              "packDisplay"
            ],
            "additionalProperties": false
          },
          "verifyPath": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "id",
          "token",
          "status",
          "packId",
          "issuedAt",
          "expiresAt",
          "revokedAt",
          "revokeReason",
          "snapshot",
          "verifyPath"
        ],
        "additionalProperties": false
      },
      "CertificateList": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "certificates": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "token": {
                  "type": "string",
                  "minLength": 1
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "active",
                    "revoked",
                    "expired"
                  ]
                },
                "packId": {
                  "type": "string",
                  "pattern": "^[0-9A-Z]{21}$"
                },
                "issuedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "expiresAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "revokedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "revokeReason": {
                  "anyOf": [
                    {
                      "type": "string",
                      "minLength": 1
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "snapshot": {
                  "type": "object",
                  "properties": {
                    "grade": {
                      "type": "string",
                      "enum": [
                        "A",
                        "B",
                        "C",
                        "D",
                        "F"
                      ]
                    },
                    "confidence": {
                      "type": "string",
                      "enum": [
                        "high",
                        "medium",
                        "low"
                      ]
                    },
                    "sohBand": {
                      "type": "object",
                      "properties": {
                        "p10": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "p50": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        },
                        "p90": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        }
                      },
                      "required": [
                        "p10",
                        "p50",
                        "p90"
                      ],
                      "additionalProperties": false
                    },
                    "chemistry": {
                      "type": "string",
                      "enum": [
                        "LFP",
                        "NMC"
                      ]
                    },
                    "segment": {
                      "type": "string",
                      "enum": [
                        "2W",
                        "3W",
                        "COMMERCIAL",
                        "4W"
                      ]
                    },
                    "modelVersion": {
                      "type": "string",
                      "minLength": 1
                    },
                    "issuerName": {
                      "type": "string",
                      "minLength": 1
                    },
                    "packDisplay": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "grade",
                    "confidence",
                    "sohBand",
                    "chemistry",
                    "segment",
                    "modelVersion",
                    "issuerName",
                    "packDisplay"
                  ],
                  "additionalProperties": false
                },
                "verifyPath": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "id",
                "token",
                "status",
                "packId",
                "issuedAt",
                "expiresAt",
                "revokedAt",
                "revokeReason",
                "snapshot",
                "verifyPath"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "certificates"
        ],
        "additionalProperties": false
      },
      "CertificateVerification": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "active",
              "revoked",
              "expired"
            ]
          },
          "issuedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "expiresAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "revokedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "snapshot": {
            "type": "object",
            "properties": {
              "grade": {
                "type": "string",
                "enum": [
                  "A",
                  "B",
                  "C",
                  "D",
                  "F"
                ]
              },
              "confidence": {
                "type": "string",
                "enum": [
                  "high",
                  "medium",
                  "low"
                ]
              },
              "sohBand": {
                "type": "object",
                "properties": {
                  "p10": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "p50": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "p90": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  }
                },
                "required": [
                  "p10",
                  "p50",
                  "p90"
                ],
                "additionalProperties": false
              },
              "chemistry": {
                "type": "string",
                "enum": [
                  "LFP",
                  "NMC"
                ]
              },
              "segment": {
                "type": "string",
                "enum": [
                  "2W",
                  "3W",
                  "COMMERCIAL",
                  "4W"
                ]
              },
              "modelVersion": {
                "type": "string",
                "minLength": 1
              },
              "issuerName": {
                "type": "string",
                "minLength": 1
              },
              "packDisplay": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "grade",
              "confidence",
              "sohBand",
              "chemistry",
              "segment",
              "modelVersion",
              "issuerName",
              "packDisplay"
            ],
            "additionalProperties": false
          },
          "verifiedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          }
        },
        "required": [
          "status",
          "issuedAt",
          "expiresAt",
          "revokedAt",
          "snapshot",
          "verifiedAt"
        ],
        "additionalProperties": false
      },
      "StatusUptime": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "percentage": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              {
                "type": "null"
              }
            ]
          },
          "samples": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "percentage",
          "samples"
        ],
        "additionalProperties": false
      },
      "StatusLatency": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "p50Ms": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          },
          "p95Ms": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "p50Ms",
          "p95Ms"
        ],
        "additionalProperties": false
      },
      "StatusComponent": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "enum": [
              "gateway_api",
              "decision_engine"
            ]
          },
          "label": {
            "type": "string",
            "minLength": 1
          },
          "state": {
            "type": "string",
            "enum": [
              "up",
              "degraded",
              "down",
              "no_data"
            ]
          },
          "uptime24h": {
            "type": "object",
            "properties": {
              "percentage": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "samples": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "percentage",
              "samples"
            ],
            "additionalProperties": false
          },
          "uptime7d": {
            "type": "object",
            "properties": {
              "percentage": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "samples": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "percentage",
              "samples"
            ],
            "additionalProperties": false
          },
          "uptime30d": {
            "type": "object",
            "properties": {
              "percentage": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "samples": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "percentage",
              "samples"
            ],
            "additionalProperties": false
          },
          "latency": {
            "type": "object",
            "properties": {
              "p50Ms": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "p95Ms": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "p50Ms",
              "p95Ms"
            ],
            "additionalProperties": false
          },
          "lastProbeAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "label",
          "state",
          "uptime24h",
          "uptime7d",
          "uptime30d",
          "latency",
          "lastProbeAt"
        ],
        "additionalProperties": false
      },
      "StatusSlo": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "targetPercentage": {
            "type": "number",
            "minimum": 0,
            "maximum": 100
          },
          "window": {
            "type": "string",
            "minLength": 1
          },
          "measuredPercentage": {
            "anyOf": [
              {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              {
                "type": "null"
              }
            ]
          },
          "meets": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "targetPercentage",
          "window",
          "measuredPercentage",
          "meets"
        ],
        "additionalProperties": false
      },
      "StatusPage": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "overall": {
            "type": "string",
            "enum": [
              "up",
              "degraded",
              "down",
              "no_data"
            ]
          },
          "components": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "enum": [
                    "gateway_api",
                    "decision_engine"
                  ]
                },
                "label": {
                  "type": "string",
                  "minLength": 1
                },
                "state": {
                  "type": "string",
                  "enum": [
                    "up",
                    "degraded",
                    "down",
                    "no_data"
                  ]
                },
                "uptime24h": {
                  "type": "object",
                  "properties": {
                    "percentage": {
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "samples": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "percentage",
                    "samples"
                  ],
                  "additionalProperties": false
                },
                "uptime7d": {
                  "type": "object",
                  "properties": {
                    "percentage": {
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "samples": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "percentage",
                    "samples"
                  ],
                  "additionalProperties": false
                },
                "uptime30d": {
                  "type": "object",
                  "properties": {
                    "percentage": {
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 100
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "samples": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "required": [
                    "percentage",
                    "samples"
                  ],
                  "additionalProperties": false
                },
                "latency": {
                  "type": "object",
                  "properties": {
                    "p50Ms": {
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ]
                    },
                    "p95Ms": {
                      "anyOf": [
                        {
                          "type": "number",
                          "minimum": 0
                        },
                        {
                          "type": "null"
                        }
                      ]
                    }
                  },
                  "required": [
                    "p50Ms",
                    "p95Ms"
                  ],
                  "additionalProperties": false
                },
                "lastProbeAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "label",
                "state",
                "uptime24h",
                "uptime7d",
                "uptime30d",
                "latency",
                "lastProbeAt"
              ],
              "additionalProperties": false
            }
          },
          "slo": {
            "type": "object",
            "properties": {
              "targetPercentage": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "window": {
                "type": "string",
                "minLength": 1
              },
              "measuredPercentage": {
                "anyOf": [
                  {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "meets": {
                "anyOf": [
                  {
                    "type": "boolean"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "targetPercentage",
              "window",
              "measuredPercentage",
              "meets"
            ],
            "additionalProperties": false
          },
          "historyBegan": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "hoursOfHistory": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "observedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          }
        },
        "required": [
          "overall",
          "components",
          "slo",
          "historyBegan",
          "hoursOfHistory",
          "observedAt"
        ],
        "additionalProperties": false
      },
      "FieldError": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "field": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        },
        "required": [
          "field",
          "message"
        ],
        "additionalProperties": false
      },
      "Problem": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "type": {
            "type": "string"
          },
          "title": {
            "type": "string"
          },
          "status": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "detail": {
            "type": "string"
          },
          "instance": {
            "type": "string"
          },
          "code": {
            "type": "string",
            "enum": [
              "INVALID_PARAMETER",
              "UNAUTHORIZED",
              "TIER_FORBIDDEN",
              "FORBIDDEN",
              "CONSENT_REQUIRED",
              "NOT_FOUND",
              "QUOTA_EXCEEDED",
              "RATE_LIMITED",
              "IDEMPOTENCY_CONFLICT",
              "CONFLICT",
              "UNPROCESSABLE_ENTITY",
              "SCORING_UPSTREAM_ERROR",
              "SCORING_UNAVAILABLE",
              "COPILOT_UNAVAILABLE",
              "UNDERWRITER_UPSTREAM_ERROR",
              "UNDERWRITER_UNAVAILABLE",
              "MFA_NOT_CONFIGURED",
              "INTERNAL_ERROR"
            ]
          },
          "errors": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "field": {
                  "type": "string"
                },
                "message": {
                  "type": "string"
                }
              },
              "required": [
                "field",
                "message"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "title",
          "status",
          "code"
        ],
        "additionalProperties": false
      },
      "HealthStatus": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          }
        },
        "required": [
          "status"
        ],
        "additionalProperties": false
      },
      "ReadinessDependencies": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "postgres": {
            "type": "string"
          },
          "scoring": {
            "type": "string"
          }
        },
        "required": [
          "postgres",
          "scoring"
        ],
        "additionalProperties": false
      },
      "ReadinessStatus": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "status": {
            "type": "string"
          },
          "dependencies": {
            "type": "object",
            "properties": {
              "postgres": {
                "type": "string"
              },
              "scoring": {
                "type": "string"
              }
            },
            "required": [
              "postgres",
              "scoring"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "status",
          "dependencies"
        ],
        "additionalProperties": false
      },
      "PackIdentityIn": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "packId": {
            "type": "string",
            "pattern": "^[0-9A-Z]{21}$"
          },
          "chemistry": {
            "type": "string",
            "enum": [
              "LFP",
              "NMC"
            ]
          },
          "segment": {
            "type": "string",
            "enum": [
              "2W",
              "3W",
              "COMMERCIAL",
              "4W"
            ]
          },
          "region": {
            "type": "string",
            "minLength": 1
          },
          "climateZone": {
            "type": "string",
            "minLength": 1
          },
          "ratedCapacityKwh": {
            "type": "number",
            "exclusiveMinimum": 0
          }
        },
        "required": [
          "packId",
          "chemistry",
          "segment",
          "ratedCapacityKwh"
        ],
        "additionalProperties": false
      },
      "ObservableRowIn": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "months": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "cumulativeChargeKwh": {
            "type": "number"
          },
          "cumulativeDischargeKwh": {
            "type": "number"
          },
          "equivalentFullCycles": {
            "type": "number"
          },
          "cycleCount": {
            "type": "number"
          },
          "hotHoursCumulative": {
            "type": "number"
          },
          "meanDod": {
            "type": "number"
          },
          "fastChargeFraction": {
            "type": "number"
          },
          "resistanceProxyOhm": {
            "type": "number"
          },
          "resistanceRatio": {
            "type": "number"
          },
          "coulombicEfficiency": {
            "type": "number"
          },
          "meanPackTempC": {
            "type": "number"
          },
          "naiveSohProxy": {
            "type": "number"
          }
        },
        "required": [
          "months",
          "equivalentFullCycles",
          "meanDod",
          "fastChargeFraction",
          "resistanceProxyOhm",
          "resistanceRatio",
          "coulombicEfficiency",
          "meanPackTempC"
        ],
        "additionalProperties": false
      },
      "DecisionView": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "packId": {
            "type": "string",
            "pattern": "^[0-9A-Z]{21}$"
          },
          "tenureMonths": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "soh": {
            "type": "object",
            "properties": {
              "packId": {
                "type": "string",
                "pattern": "^[0-9A-Z]{21}$"
              },
              "sohPercent": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "sohBand": {
                "type": "object",
                "properties": {
                  "p10": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "p50": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  },
                  "p90": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 100
                  }
                },
                "required": [
                  "p10",
                  "p50",
                  "p90"
                ],
                "additionalProperties": false
              },
              "reasonCodes": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "feature": {
                      "type": "string",
                      "minLength": 1
                    },
                    "label": {
                      "type": "string",
                      "minLength": 1
                    },
                    "direction": {
                      "type": "string",
                      "enum": [
                        "lowers",
                        "raises"
                      ]
                    },
                    "contribution": {
                      "type": "number"
                    }
                  },
                  "required": [
                    "feature",
                    "label",
                    "direction",
                    "contribution"
                  ],
                  "additionalProperties": false
                }
              },
              "insuranceRisk": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "tier": {
                        "type": "string",
                        "enum": [
                          "low",
                          "moderate",
                          "elevated",
                          "high"
                        ]
                      },
                      "riskScore": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100
                      },
                      "rationale": {
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "basis": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "tier",
                      "riskScore",
                      "rationale",
                      "basis"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "healthGrade": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "grade": {
                        "type": "string",
                        "enum": [
                          "A",
                          "B",
                          "C",
                          "D",
                          "F"
                        ]
                      },
                      "healthScore": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100
                      },
                      "confidence": {
                        "type": "string",
                        "enum": [
                          "high",
                          "medium",
                          "low"
                        ]
                      },
                      "headline": {
                        "type": "string",
                        "minLength": 1
                      },
                      "basis": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "grade",
                      "healthScore",
                      "confidence",
                      "headline",
                      "basis"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "behaviorRisk": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "score": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100
                      },
                      "tier": {
                        "type": "string",
                        "enum": [
                          "low",
                          "moderate",
                          "elevated",
                          "high"
                        ]
                      },
                      "components": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "kind": {
                              "type": "string",
                              "enum": [
                                "fast_charge",
                                "depth_of_discharge",
                                "thermal_exposure"
                              ]
                            },
                            "label": {
                              "type": "string",
                              "minLength": 1
                            },
                            "observedValue": {
                              "type": "number"
                            },
                            "subScore": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 100
                            },
                            "rationale": {
                              "type": "string",
                              "minLength": 1
                            }
                          },
                          "required": [
                            "kind",
                            "label",
                            "observedValue",
                            "subScore",
                            "rationale"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "assumptions": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "basis": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "score",
                      "tier",
                      "components",
                      "assumptions",
                      "basis"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "secondLife": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "automotiveEndMonths": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "automotiveEndAgeYears": {
                        "type": "number",
                        "minimum": 0
                      },
                      "residualCapacityPct": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100
                      },
                      "residualCapacityBand": {
                        "type": "object",
                        "properties": {
                          "p10": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 100
                          },
                          "p50": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 100
                          },
                          "p90": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 100
                          }
                        },
                        "required": [
                          "p10",
                          "p50",
                          "p90"
                        ],
                        "additionalProperties": false
                      },
                      "indicativeValueInr": {
                        "type": "number",
                        "minimum": 0
                      },
                      "valueBand": {
                        "type": "object",
                        "properties": {
                          "p10": {
                            "type": "number",
                            "minimum": 0
                          },
                          "p50": {
                            "type": "number",
                            "minimum": 0
                          },
                          "p90": {
                            "type": "number",
                            "minimum": 0
                          }
                        },
                        "required": [
                          "p10",
                          "p50",
                          "p90"
                        ],
                        "additionalProperties": false
                      },
                      "grade": {
                        "type": "string",
                        "enum": [
                          "repurpose",
                          "marginal",
                          "recycle"
                        ]
                      },
                      "assumptions": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "basis": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "automotiveEndMonths",
                      "automotiveEndAgeYears",
                      "residualCapacityPct",
                      "residualCapacityBand",
                      "indicativeValueInr",
                      "valueBand",
                      "grade",
                      "assumptions",
                      "basis"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "warrantyLossCost": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "warrantyTermMonths": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "warrantySohThresholdPct": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 100
                      },
                      "breachProbability": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      },
                      "remedyCostInr": {
                        "type": "number",
                        "minimum": 0
                      },
                      "expectedLossCostInr": {
                        "type": "number",
                        "minimum": 0
                      },
                      "reserveInr": {
                        "type": "number",
                        "minimum": 0
                      },
                      "horizonLimited": {
                        "type": "boolean"
                      },
                      "reserveCurve": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "monthsFromNow": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 9007199254740991
                            },
                            "cumulativeBreachProbability": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 1
                            },
                            "reserveInr": {
                              "type": "number",
                              "minimum": 0
                            }
                          },
                          "required": [
                            "monthsFromNow",
                            "cumulativeBreachProbability",
                            "reserveInr"
                          ],
                          "additionalProperties": false
                        }
                      },
                      "assumptions": {
                        "minItems": 1,
                        "type": "array",
                        "items": {
                          "type": "string",
                          "minLength": 1
                        }
                      },
                      "basis": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "warrantyTermMonths",
                      "warrantySohThresholdPct",
                      "breachProbability",
                      "remedyCostInr",
                      "expectedLossCostInr",
                      "reserveInr",
                      "horizonLimited",
                      "reserveCurve",
                      "assumptions",
                      "basis"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "computedAt": {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              "modelVersion": {
                "type": "string",
                "minLength": 1
              }
            },
            "required": [
              "packId",
              "sohPercent",
              "sohBand",
              "reasonCodes",
              "insuranceRisk",
              "healthGrade",
              "behaviorRisk",
              "secondLife",
              "warrantyLossCost",
              "computedAt",
              "modelVersion"
            ],
            "additionalProperties": false
          },
          "residual": {
            "type": "object",
            "properties": {
              "packId": {
                "type": "string",
                "pattern": "^[0-9A-Z]{21}$"
              },
              "horizonMonths": {
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "residualValueInr": {
                "type": "number",
                "minimum": 0
              },
              "band": {
                "type": "object",
                "properties": {
                  "p10": {
                    "type": "number",
                    "minimum": 0
                  },
                  "p50": {
                    "type": "number",
                    "minimum": 0
                  },
                  "p90": {
                    "type": "number",
                    "minimum": 0
                  }
                },
                "required": [
                  "p10",
                  "p50",
                  "p90"
                ],
                "additionalProperties": false
              },
              "assumptions": {
                "minItems": 1,
                "type": "array",
                "items": {
                  "type": "string",
                  "minLength": 1
                }
              }
            },
            "required": [
              "packId",
              "horizonMonths",
              "residualValueInr",
              "band",
              "assumptions"
            ],
            "additionalProperties": false
          },
          "flags": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "packId": {
                  "type": "string",
                  "pattern": "^[0-9A-Z]{21}$"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "THERMAL_ABUSE",
                    "FAST_CHARGE_INTENSITY",
                    "DEEP_CYCLING",
                    "CALENDAR_AGING"
                  ]
                },
                "severity": {
                  "type": "string",
                  "enum": [
                    "LOW",
                    "MEDIUM",
                    "HIGH"
                  ]
                },
                "evidence": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "packId",
                "kind",
                "severity",
                "evidence"
              ],
              "additionalProperties": false
            }
          },
          "suggestedLtvUpliftPct": {
            "type": "number"
          },
          "assumptions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "required": [
          "packId",
          "tenureMonths",
          "soh",
          "residual",
          "flags",
          "suggestedLtvUpliftPct",
          "assumptions"
        ],
        "additionalProperties": false
      },
      "DecisionLookupRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "tenureMonths": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "identity": {
            "type": "object",
            "properties": {
              "packId": {
                "type": "string",
                "pattern": "^[0-9A-Z]{21}$"
              },
              "chemistry": {
                "type": "string",
                "enum": [
                  "LFP",
                  "NMC"
                ]
              },
              "segment": {
                "type": "string",
                "enum": [
                  "2W",
                  "3W",
                  "COMMERCIAL",
                  "4W"
                ]
              },
              "region": {
                "type": "string",
                "minLength": 1
              },
              "climateZone": {
                "type": "string",
                "minLength": 1
              },
              "ratedCapacityKwh": {
                "type": "number",
                "exclusiveMinimum": 0
              }
            },
            "required": [
              "packId",
              "chemistry",
              "segment",
              "ratedCapacityKwh"
            ],
            "additionalProperties": false
          },
          "observations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "months": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "cumulativeChargeKwh": {
                  "type": "number"
                },
                "cumulativeDischargeKwh": {
                  "type": "number"
                },
                "equivalentFullCycles": {
                  "type": "number"
                },
                "cycleCount": {
                  "type": "number"
                },
                "hotHoursCumulative": {
                  "type": "number"
                },
                "meanDod": {
                  "type": "number"
                },
                "fastChargeFraction": {
                  "type": "number"
                },
                "resistanceProxyOhm": {
                  "type": "number"
                },
                "resistanceRatio": {
                  "type": "number"
                },
                "coulombicEfficiency": {
                  "type": "number"
                },
                "meanPackTempC": {
                  "type": "number"
                },
                "naiveSohProxy": {
                  "type": "number"
                }
              },
              "required": [
                "months",
                "equivalentFullCycles",
                "meanDod",
                "fastChargeFraction",
                "resistanceProxyOhm",
                "resistanceRatio",
                "coulombicEfficiency",
                "meanPackTempC"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "observations"
        ],
        "additionalProperties": false
      },
      "RescoreRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "reason"
        ],
        "additionalProperties": false
      },
      "FleetIngestPack": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "identity": {
            "type": "object",
            "properties": {
              "packId": {
                "type": "string",
                "pattern": "^[0-9A-Z]{21}$"
              },
              "chemistry": {
                "type": "string",
                "enum": [
                  "LFP",
                  "NMC"
                ]
              },
              "segment": {
                "type": "string",
                "enum": [
                  "2W",
                  "3W",
                  "COMMERCIAL",
                  "4W"
                ]
              },
              "region": {
                "type": "string",
                "minLength": 1
              },
              "climateZone": {
                "type": "string",
                "minLength": 1
              },
              "ratedCapacityKwh": {
                "type": "number",
                "exclusiveMinimum": 0
              }
            },
            "required": [
              "packId",
              "chemistry",
              "segment",
              "ratedCapacityKwh"
            ],
            "additionalProperties": false
          },
          "observations": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "months": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "cumulativeChargeKwh": {
                  "type": "number"
                },
                "cumulativeDischargeKwh": {
                  "type": "number"
                },
                "equivalentFullCycles": {
                  "type": "number"
                },
                "cycleCount": {
                  "type": "number"
                },
                "hotHoursCumulative": {
                  "type": "number"
                },
                "meanDod": {
                  "type": "number"
                },
                "fastChargeFraction": {
                  "type": "number"
                },
                "resistanceProxyOhm": {
                  "type": "number"
                },
                "resistanceRatio": {
                  "type": "number"
                },
                "coulombicEfficiency": {
                  "type": "number"
                },
                "meanPackTempC": {
                  "type": "number"
                },
                "naiveSohProxy": {
                  "type": "number"
                }
              },
              "required": [
                "months",
                "equivalentFullCycles",
                "meanDod",
                "fastChargeFraction",
                "resistanceProxyOhm",
                "resistanceRatio",
                "coulombicEfficiency",
                "meanPackTempC"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "identity",
          "observations"
        ],
        "additionalProperties": false
      },
      "FleetIngestRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "packs": {
            "minItems": 1,
            "maxItems": 500,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "identity": {
                  "type": "object",
                  "properties": {
                    "packId": {
                      "type": "string",
                      "pattern": "^[0-9A-Z]{21}$"
                    },
                    "chemistry": {
                      "type": "string",
                      "enum": [
                        "LFP",
                        "NMC"
                      ]
                    },
                    "segment": {
                      "type": "string",
                      "enum": [
                        "2W",
                        "3W",
                        "COMMERCIAL",
                        "4W"
                      ]
                    },
                    "region": {
                      "type": "string",
                      "minLength": 1
                    },
                    "climateZone": {
                      "type": "string",
                      "minLength": 1
                    },
                    "ratedCapacityKwh": {
                      "type": "number",
                      "exclusiveMinimum": 0
                    }
                  },
                  "required": [
                    "packId",
                    "chemistry",
                    "segment",
                    "ratedCapacityKwh"
                  ],
                  "additionalProperties": false
                },
                "observations": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "months": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      },
                      "cumulativeChargeKwh": {
                        "type": "number"
                      },
                      "cumulativeDischargeKwh": {
                        "type": "number"
                      },
                      "equivalentFullCycles": {
                        "type": "number"
                      },
                      "cycleCount": {
                        "type": "number"
                      },
                      "hotHoursCumulative": {
                        "type": "number"
                      },
                      "meanDod": {
                        "type": "number"
                      },
                      "fastChargeFraction": {
                        "type": "number"
                      },
                      "resistanceProxyOhm": {
                        "type": "number"
                      },
                      "resistanceRatio": {
                        "type": "number"
                      },
                      "coulombicEfficiency": {
                        "type": "number"
                      },
                      "meanPackTempC": {
                        "type": "number"
                      },
                      "naiveSohProxy": {
                        "type": "number"
                      }
                    },
                    "required": [
                      "months",
                      "equivalentFullCycles",
                      "meanDod",
                      "fastChargeFraction",
                      "resistanceProxyOhm",
                      "resistanceRatio",
                      "coulombicEfficiency",
                      "meanPackTempC"
                    ],
                    "additionalProperties": false
                  }
                }
              },
              "required": [
                "identity",
                "observations"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "packs"
        ],
        "additionalProperties": false
      },
      "ApplicationBatchFailure": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "applicationId": {
            "type": "string"
          },
          "error": {
            "type": "string"
          }
        },
        "required": [
          "applicationId",
          "error"
        ],
        "additionalProperties": false
      },
      "ApplicationBatchRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "applications": {
            "minItems": 1,
            "maxItems": 500,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "applicationId": {
                  "type": "string",
                  "minLength": 1
                },
                "product": {
                  "type": "string",
                  "enum": [
                    "personal_loan",
                    "auto_loan",
                    "ev_loan"
                  ]
                },
                "applicant": {
                  "type": "object",
                  "properties": {
                    "applicantId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "displayName": {
                      "type": "string",
                      "minLength": 1
                    },
                    "state": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "applicantId",
                    "displayName",
                    "state"
                  ],
                  "additionalProperties": false
                },
                "requestedAmount": {
                  "type": "number",
                  "exclusiveMinimum": 0
                },
                "requestedTermMonths": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "collateral": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "none",
                        "vehicle",
                        "ev_battery",
                        "other"
                      ]
                    },
                    "descriptor": {
                      "type": "string",
                      "minLength": 1
                    },
                    "statedValue": {
                      "type": "number",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "kind",
                    "descriptor"
                  ],
                  "additionalProperties": false
                },
                "documents": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "documentId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "pay_stub",
                          "bank_statement",
                          "id_document",
                          "vehicle_title",
                          "other"
                        ]
                      },
                      "filename": {
                        "type": "string",
                        "minLength": 1
                      },
                      "received": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "documentId",
                      "kind",
                      "filename",
                      "received"
                    ],
                    "additionalProperties": false
                  }
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "received",
                    "processing",
                    "decided",
                    "referred"
                  ]
                },
                "submittedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "suppliedFacts": {
                  "type": "object",
                  "properties": {
                    "creditScore": {
                      "type": "integer",
                      "minimum": 300,
                      "maximum": 850
                    },
                    "dti": {
                      "type": "number",
                      "minimum": 0
                    },
                    "monthlyIncome": {
                      "type": "number",
                      "minimum": 0
                    },
                    "requestedAmount": {
                      "type": "number",
                      "minimum": 0
                    },
                    "requestedTermMonths": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "identityVerified": {
                      "type": "boolean"
                    },
                    "fraudRisk": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    "collateralValue": {
                      "type": "number",
                      "minimum": 0
                    },
                    "ltv": {
                      "type": "number",
                      "minimum": 0
                    },
                    "nsfCount90d": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "derogatories": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "additionalProperties": false
                }
              },
              "required": [
                "applicationId",
                "product",
                "applicant",
                "requestedAmount",
                "requestedTermMonths",
                "documents",
                "status",
                "submittedAt"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "applications"
        ],
        "additionalProperties": false
      },
      "ApplicationBatchResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "decided": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "persisted": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "failed": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "applicationId": {
                  "type": "string"
                },
                "error": {
                  "type": "string"
                }
              },
              "required": [
                "applicationId",
                "error"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "decided",
          "persisted",
          "failed"
        ],
        "additionalProperties": false
      },
      "BatchJobStatus": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "string",
        "enum": [
          "queued",
          "running",
          "succeeded",
          "failed"
        ]
      },
      "BatchJobSubmitRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "applications": {
            "minItems": 1,
            "maxItems": 10000,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "applicationId": {
                  "type": "string",
                  "minLength": 1
                },
                "product": {
                  "type": "string",
                  "enum": [
                    "personal_loan",
                    "auto_loan",
                    "ev_loan"
                  ]
                },
                "applicant": {
                  "type": "object",
                  "properties": {
                    "applicantId": {
                      "type": "string",
                      "minLength": 1
                    },
                    "displayName": {
                      "type": "string",
                      "minLength": 1
                    },
                    "state": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "applicantId",
                    "displayName",
                    "state"
                  ],
                  "additionalProperties": false
                },
                "requestedAmount": {
                  "type": "number",
                  "exclusiveMinimum": 0
                },
                "requestedTermMonths": {
                  "type": "integer",
                  "exclusiveMinimum": 0,
                  "maximum": 9007199254740991
                },
                "collateral": {
                  "type": "object",
                  "properties": {
                    "kind": {
                      "type": "string",
                      "enum": [
                        "none",
                        "vehicle",
                        "ev_battery",
                        "other"
                      ]
                    },
                    "descriptor": {
                      "type": "string",
                      "minLength": 1
                    },
                    "statedValue": {
                      "type": "number",
                      "minimum": 0
                    }
                  },
                  "required": [
                    "kind",
                    "descriptor"
                  ],
                  "additionalProperties": false
                },
                "documents": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "documentId": {
                        "type": "string",
                        "minLength": 1
                      },
                      "kind": {
                        "type": "string",
                        "enum": [
                          "pay_stub",
                          "bank_statement",
                          "id_document",
                          "vehicle_title",
                          "other"
                        ]
                      },
                      "filename": {
                        "type": "string",
                        "minLength": 1
                      },
                      "received": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "documentId",
                      "kind",
                      "filename",
                      "received"
                    ],
                    "additionalProperties": false
                  }
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "received",
                    "processing",
                    "decided",
                    "referred"
                  ]
                },
                "submittedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "suppliedFacts": {
                  "type": "object",
                  "properties": {
                    "creditScore": {
                      "type": "integer",
                      "minimum": 300,
                      "maximum": 850
                    },
                    "dti": {
                      "type": "number",
                      "minimum": 0
                    },
                    "monthlyIncome": {
                      "type": "number",
                      "minimum": 0
                    },
                    "requestedAmount": {
                      "type": "number",
                      "minimum": 0
                    },
                    "requestedTermMonths": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "identityVerified": {
                      "type": "boolean"
                    },
                    "fraudRisk": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 1
                    },
                    "collateralValue": {
                      "type": "number",
                      "minimum": 0
                    },
                    "ltv": {
                      "type": "number",
                      "minimum": 0
                    },
                    "nsfCount90d": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "derogatories": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    }
                  },
                  "additionalProperties": false
                }
              },
              "required": [
                "applicationId",
                "product",
                "applicant",
                "requestedAmount",
                "requestedTermMonths",
                "documents",
                "status",
                "submittedAt"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "applications"
        ],
        "additionalProperties": false
      },
      "BatchJobSubmitResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "jobId": {
            "type": "string",
            "minLength": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "succeeded",
              "failed"
            ]
          },
          "total": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "statusUrl": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "jobId",
          "status",
          "total",
          "statusUrl"
        ],
        "additionalProperties": false
      },
      "BatchJob": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "kind": {
            "type": "string",
            "const": "application_intake"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "succeeded",
              "failed"
            ]
          },
          "total": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "processed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "succeeded": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "failed": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "error": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "createdAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          },
          "startedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "finishedAt": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "required": [
          "id",
          "kind",
          "status",
          "total",
          "processed",
          "succeeded",
          "failed",
          "error",
          "createdAt",
          "startedAt",
          "finishedAt"
        ],
        "additionalProperties": false
      },
      "BatchJobListResponse": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "jobs": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "minLength": 1
                },
                "kind": {
                  "type": "string",
                  "const": "application_intake"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "queued",
                    "running",
                    "succeeded",
                    "failed"
                  ]
                },
                "total": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "processed": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "succeeded": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "failed": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "error": {
                  "anyOf": [
                    {
                      "type": "string"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "createdAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                },
                "startedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "finishedAt": {
                  "anyOf": [
                    {
                      "type": "string",
                      "format": "date-time",
                      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                    },
                    {
                      "type": "null"
                    }
                  ]
                }
              },
              "required": [
                "id",
                "kind",
                "status",
                "total",
                "processed",
                "succeeded",
                "failed",
                "error",
                "createdAt",
                "startedAt",
                "finishedAt"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "jobs"
        ],
        "additionalProperties": false
      },
      "RevokeRequest": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "reason": {
            "type": "string"
          }
        },
        "required": [
          "reason"
        ],
        "additionalProperties": false
      },
      "UsageMetric": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "metric": {
            "type": "string"
          },
          "used": {
            "type": "integer",
            "minimum": 0,
            "maximum": 9007199254740991
          },
          "quota": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "remaining": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              {
                "type": "null"
              }
            ]
          },
          "unlimited": {
            "type": "boolean"
          }
        },
        "required": [
          "metric",
          "used",
          "quota",
          "remaining",
          "unlimited"
        ],
        "additionalProperties": false
      },
      "UsageView": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "period": {
            "type": "string"
          },
          "tier": {
            "type": "string"
          },
          "metrics": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "metric": {
                  "type": "string"
                },
                "used": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                "quota": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "remaining": {
                  "anyOf": [
                    {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "unlimited": {
                  "type": "boolean"
                }
              },
              "required": [
                "metric",
                "used",
                "quota",
                "remaining",
                "unlimited"
              ],
              "additionalProperties": false
            }
          }
        },
        "required": [
          "period",
          "tier",
          "metrics"
        ],
        "additionalProperties": false
      },
      "PageInfo": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "nextCursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ]
          },
          "hasMore": {
            "type": "boolean"
          },
          "limit": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          }
        },
        "required": [
          "nextCursor",
          "hasMore",
          "limit"
        ],
        "additionalProperties": false
      },
      "PackRowResidual": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "horizonMonths": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "residualValueInr": {
            "type": "number"
          },
          "band": {
            "type": "object",
            "properties": {
              "p10": {
                "type": "number",
                "minimum": 0
              },
              "p50": {
                "type": "number",
                "minimum": 0
              },
              "p90": {
                "type": "number",
                "minimum": 0
              }
            },
            "required": [
              "p10",
              "p50",
              "p90"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "horizonMonths",
          "residualValueInr",
          "band"
        ],
        "additionalProperties": false
      },
      "PackRow": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "packId": {
            "type": "string",
            "pattern": "^[0-9A-Z]{21}$"
          },
          "make": {
            "type": "string"
          },
          "model": {
            "type": "string"
          },
          "segment": {
            "type": "string",
            "enum": [
              "2W",
              "3W",
              "COMMERCIAL",
              "4W"
            ]
          },
          "chemistry": {
            "type": "string",
            "enum": [
              "LFP",
              "NMC"
            ]
          },
          "sohPercent": {
            "type": "number"
          },
          "sohBand": {
            "type": "object",
            "properties": {
              "p10": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "p50": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              },
              "p90": {
                "type": "number",
                "minimum": 0,
                "maximum": 100
              }
            },
            "required": [
              "p10",
              "p50",
              "p90"
            ],
            "additionalProperties": false
          },
          "residual": {
            "type": "object",
            "properties": {
              "horizonMonths": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              },
              "residualValueInr": {
                "type": "number"
              },
              "band": {
                "type": "object",
                "properties": {
                  "p10": {
                    "type": "number",
                    "minimum": 0
                  },
                  "p50": {
                    "type": "number",
                    "minimum": 0
                  },
                  "p90": {
                    "type": "number",
                    "minimum": 0
                  }
                },
                "required": [
                  "p10",
                  "p50",
                  "p90"
                ],
                "additionalProperties": false
              }
            },
            "required": [
              "horizonMonths",
              "residualValueInr",
              "band"
            ],
            "additionalProperties": false
          },
          "flagCount": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "maxFlagSeverity": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "LOW",
                  "MEDIUM",
                  "HIGH"
                ]
              },
              {
                "type": "null"
              }
            ]
          },
          "suggestedLtvUpliftPct": {
            "type": "number"
          },
          "scoreComputedAt": {
            "type": "string",
            "format": "date-time",
            "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
          }
        },
        "required": [
          "packId",
          "make",
          "model",
          "segment",
          "chemistry",
          "sohPercent",
          "sohBand",
          "residual",
          "flagCount",
          "maxFlagSeverity",
          "suggestedLtvUpliftPct",
          "scoreComputedAt"
        ],
        "additionalProperties": false
      },
      "PackRowPage": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "type": "object",
        "properties": {
          "items": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "packId": {
                  "type": "string",
                  "pattern": "^[0-9A-Z]{21}$"
                },
                "make": {
                  "type": "string"
                },
                "model": {
                  "type": "string"
                },
                "segment": {
                  "type": "string",
                  "enum": [
                    "2W",
                    "3W",
                    "COMMERCIAL",
                    "4W"
                  ]
                },
                "chemistry": {
                  "type": "string",
                  "enum": [
                    "LFP",
                    "NMC"
                  ]
                },
                "sohPercent": {
                  "type": "number"
                },
                "sohBand": {
                  "type": "object",
                  "properties": {
                    "p10": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "p50": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100
                    },
                    "p90": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 100
                    }
                  },
                  "required": [
                    "p10",
                    "p50",
                    "p90"
                  ],
                  "additionalProperties": false
                },
                "residual": {
                  "type": "object",
                  "properties": {
                    "horizonMonths": {
                      "type": "integer",
                      "minimum": -9007199254740991,
                      "maximum": 9007199254740991
                    },
                    "residualValueInr": {
                      "type": "number"
                    },
                    "band": {
                      "type": "object",
                      "properties": {
                        "p10": {
                          "type": "number",
                          "minimum": 0
                        },
                        "p50": {
                          "type": "number",
                          "minimum": 0
                        },
                        "p90": {
                          "type": "number",
                          "minimum": 0
                        }
                      },
                      "required": [
                        "p10",
                        "p50",
                        "p90"
                      ],
                      "additionalProperties": false
                    }
                  },
                  "required": [
                    "horizonMonths",
                    "residualValueInr",
                    "band"
                  ],
                  "additionalProperties": false
                },
                "flagCount": {
                  "type": "integer",
                  "minimum": -9007199254740991,
                  "maximum": 9007199254740991
                },
                "maxFlagSeverity": {
                  "anyOf": [
                    {
                      "type": "string",
                      "enum": [
                        "LOW",
                        "MEDIUM",
                        "HIGH"
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "suggestedLtvUpliftPct": {
                  "type": "number"
                },
                "scoreComputedAt": {
                  "type": "string",
                  "format": "date-time",
                  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
                }
              },
              "required": [
                "packId",
                "make",
                "model",
                "segment",
                "chemistry",
                "sohPercent",
                "sohBand",
                "residual",
                "flagCount",
                "maxFlagSeverity",
                "suggestedLtvUpliftPct",
                "scoreComputedAt"
              ],
              "additionalProperties": false
            }
          },
          "page": {
            "type": "object",
            "properties": {
              "nextCursor": {
                "anyOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "hasMore": {
                "type": "boolean"
              },
              "limit": {
                "type": "integer",
                "minimum": -9007199254740991,
                "maximum": 9007199254740991
              }
            },
            "required": [
              "nextCursor",
              "hasMore",
              "limit"
            ],
            "additionalProperties": false
          }
        },
        "required": [
          "items",
          "page"
        ],
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "An organization API key, presented as `Authorization: Bearer <key>`. Mint keys in the Themisure console. This is the credential the SDKs use."
      },
      "cookieAuth": {
        "type": "apiKey",
        "in": "cookie",
        "name": "themisure_session",
        "description": "An interactive console session cookie. Only the session-only endpoints (fleet ingest/drift, usage, and certificate management) accept this; they cannot be called with an API key. The programmatic endpoints use bearerAuth."
      }
    }
  }
}
