{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/trymnemo-com/json-schema/trymnemo-com-namespace-created-schema.json",
  "title": "NamespaceCreated",
  "x-generated": "2026-11-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/trymnemo-com-openapi.json#/components/schemas/NamespaceCreated",
  "type": "object",
  "required": [
    "tenant_id",
    "capability",
    "storage_class",
    "durable",
    "state",
    "expires_at",
    "ttl_seconds",
    "object_limit",
    "byte_limit",
    "objects_used",
    "bytes_used",
    "upgrade_available"
  ],
  "properties": {
    "tenant_id": {
      "type": "string",
      "description": "Namespace identifier; unchanged by promotion."
    },
    "capability": {
      "type": "string",
      "description": "Returned ONCE. Send as X-Mnemo-Capability."
    },
    "storage_class": {
      "type": "string",
      "enum": [
        "ephemeral"
      ]
    },
    "durable": {
      "type": "boolean",
      "description": "false: an unpromoted namespace's data is purged at `expires_at` (a funded namespace keeps its data until retained_until)."
    },
    "state": {
      "type": "string",
      "enum": [
        "ACTIVE"
      ]
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "description": "Fixed at creation; activity does not extend it. The capability stops authenticating at this instant and an unpromoted namespace's data is purged."
    },
    "ttl_seconds": {
      "type": "integer",
      "description": "Lifetime granted, in seconds."
    },
    "object_limit": {
      "type": "integer",
      "description": "Maximum objects in this namespace."
    },
    "byte_limit": {
      "type": "integer",
      "description": "Maximum accounted bytes in this namespace (one object accounts for 4 x dimensions + 512 bytes, plus the size of its `subject`)."
    },
    "objects_used": {
      "type": "integer"
    },
    "bytes_used": {
      "type": "integer"
    },
    "upgrade_available": {
      "type": "boolean"
    }
  }
}