{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/defianceinternational-io/json-schema/defianceinternational-io-get-public-config-200-schema.json",
  "title": "getPublicConfig.200",
  "description": "The non-secret runtime configuration the browser needs.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/defianceinternational-io-platform-api-openapi.yml#/components/schemas/getPublicConfig.200",
  "type": "object",
  "properties": {
    "stripePublishableKey": {
      "description": "The payment processor publishable key for the browser, or null when none is configured. Never a secret key.",
      "type": [
        "string",
        "null"
      ]
    },
    "paymentsCryptoEnabled": {
      "type": "boolean",
      "description": "Whether the optional digital-currency payment method is offered."
    },
    "checkoutMode": {
      "type": "string",
      "enum": [
        "live",
        "test",
        "refused"
      ],
      "description": "The derived checkout mode: live, test (no real charges) or refused. The refusal reason is operator-only."
    },
    "readonlyCheckout": {
      "type": "boolean",
      "description": "True exactly when checkoutMode is refused. Kept as the backward-compatible projection."
    },
    "demoAccountsEnabled": {
      "type": "boolean",
      "description": "Whether the one-click demonstration sign-in is offered. Never a credential."
    },
    "demoAccounts": {
      "description": "The demonstration persona descriptors. Present only when demoAccountsEnabled is true; absent on a production deployment.",
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "persona": {
            "type": "string",
            "enum": [
              "admin",
              "member"
            ],
            "description": "The demonstration persona key."
          },
          "email": {
            "type": "string",
            "minLength": 1,
            "description": "The reserved, non-routable sign-in address of the persona. Never a credential."
          },
          "scope": {
            "type": "string",
            "minLength": 1,
            "description": "One line describing what the persona can reach."
          }
        },
        "required": [
          "persona",
          "email",
          "scope"
        ],
        "additionalProperties": false
      }
    },
    "shippingConfigured": {
      "type": "boolean",
      "description": "Whether the shipping provider is configured."
    },
    "analyticsFirstParty": {
      "type": "boolean",
      "const": true,
      "description": "Analytics are first party only."
    },
    "institutionCheckout": {
      "type": "object",
      "properties": {
        "types": {
          "minItems": 1,
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "university",
              "research_institute",
              "company_lab",
              "government_lab",
              "other"
            ]
          },
          "description": "The institution types checkout offers, in display order."
        },
        "personalEmailAcceptedTypes": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "university",
              "research_institute",
              "company_lab",
              "government_lab",
              "other"
            ]
          },
          "description": "The offered types whose contact may use a personal email domain."
        },
        "confirmationRequired": {
          "type": "boolean",
          "description": "Whether the buyer must confirm the institution email by link before the order proceeds."
        }
      },
      "required": [
        "types",
        "personalEmailAcceptedTypes",
        "confirmationRequired"
      ],
      "additionalProperties": false,
      "description": "The checkout institution policy (IDC-R9). Derived lists only; no setting is named."
    },
    "researchUseOnly": {
      "type": "string",
      "description": "The boundary statement, stated once at the top level.",
      "pattern": "^Research use only\\. Not for human consumption\\.$"
    }
  },
  "required": [
    "stripePublishableKey",
    "paymentsCryptoEnabled",
    "checkoutMode",
    "readonlyCheckout",
    "demoAccountsEnabled",
    "shippingConfigured",
    "analyticsFirstParty",
    "institutionCheckout",
    "researchUseOnly"
  ],
  "additionalProperties": false
}