{
  "openapi": "3.1.0",
  "info": {
    "title": "SerenAI API",
    "description": "Pay Per Call Agentic Commerce for public and private data",
    "contact": {
      "name": "SerenAI Team",
      "email": "team@serendb.com"
    },
    "license": {
      "name": "UNLICENSED",
      "identifier": "UNLICENSED"
    },
    "version": "0.1.0"
  },
  "servers": [
    {
      "url": "https://api.serendb.com",
      "description": "Seren API"
    }
  ],
  "paths": {
    "/auth/agent": {
      "post": {
        "tags": [
          "agent"
        ],
        "summary": "POST /auth/agent\nRegister a new AI agent account.",
        "description": "This endpoint allows AI agents to self-register and receive an API key immediately.\nUnlike the standard signup flow, agent registration:\n- Does NOT require email verification\n- Automatically creates a personal organization\n- Returns an API key named \"agent\" for immediate use\n\n**Important:** Save the `api_key` immediately - it is only shown once!",
        "operationId": "agent_register",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentRegisterRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Agent registered successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_AgentRegisterResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request (validation error)"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      },
      "patch": {
        "tags": [
          "agent"
        ],
        "summary": "Update an agent's profile (e.g. set a real email address).",
        "description": "When the email is changed, `email_verified` is set to `false` and a\nverification email with a clickable link is sent. The user verifies\nby clicking the link — no separate API call is needed.\nA verified email is required before making Stripe deposits.",
        "operationId": "agent_update",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AgentUpdateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Agent updated"
          },
          "400": {
            "description": "Invalid email"
          },
          "401": {
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/auth/forgot-password": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "POST /auth/forgot-password\nRequest a password reset email",
        "operationId": "forgot_password",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ForgotPasswordRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Password reset email sent if account exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_PasswordResetSent"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          }
        }
      }
    },
    "/auth/me": {
      "get": {
        "tags": [
          "Auth"
        ],
        "summary": "GET /auth/me\nGet current authenticated user information with default organization",
        "operationId": "get_current_user",
        "responses": {
          "200": {
            "description": "Current user information with default organization",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_UserMe"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/auth/resend-verification": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "POST /auth/resend-verification\nResend email verification link",
        "operationId": "resend_verification_email",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResendVerificationRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Verification email sent if account exists",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_VerificationSent"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          }
        }
      }
    },
    "/auth/reset-password": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "POST /auth/reset-password\nReset password using a valid token",
        "operationId": "reset_password",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ResetPasswordRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Password reset successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_PasswordReset"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or expired token"
          },
          "404": {
            "description": "Token not found"
          }
        }
      }
    },
    "/auth/verify-email": {
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "POST /auth/verify-email\nVerify email address using a token from the verification email link.\nCalled by the console frontend when the user clicks the link — agents\ndo not need to call this directly.\nOn success, automatically logs the user in and returns tokens",
        "operationId": "verify_email",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VerifyEmailRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Email verified and user logged in",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_LoginResult"
                }
              }
            }
          },
          "400": {
            "description": "Invalid or expired token"
          }
        }
      }
    },
    "/billing/health": {
      "get": {
        "tags": [
          "billing"
        ],
        "summary": "GET /billing/health\nHigh-level billing and metering health summary for Seren Core",
        "operationId": "get_billing_health",
        "responses": {
          "200": {
            "description": "Billing health retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_BillingHealth"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/billing/invoices/generate": {
      "post": {
        "tags": [
          "billing"
        ],
        "summary": "POST /billing/invoices/generate\nGenerate monthly invoices for all organizations",
        "operationId": "generate_invoices",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GenerateInvoicesRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Invoices generated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_InvoicesGenerated"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/billing/invoices/{id}": {
      "get": {
        "tags": [
          "billing"
        ],
        "summary": "GET /billing/invoices/:id\nGet invoice details with line items",
        "operationId": "get_invoice",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Invoice ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Invoice retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Invoice"
                }
              }
            }
          },
          "404": {
            "description": "Invoice not found"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/billing/invoices/{id}/issue": {
      "post": {
        "tags": [
          "billing"
        ],
        "summary": "POST /billing/invoices/:id/issue\nIssue a draft invoice",
        "operationId": "issue_invoice",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Invoice ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Invoice issued successfully"
          },
          "404": {
            "description": "Invoice not found"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/billing/invoices/{id}/pay": {
      "post": {
        "tags": [
          "payments"
        ],
        "summary": "POST /billing/invoices/:id/pay\nCreate a payment intent for an invoice",
        "operationId": "create_payment_intent",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Invoice ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payment intent created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_PaymentIntentCreated"
                }
              }
            }
          },
          "400": {
            "description": "Invoice not in payable state"
          },
          "404": {
            "description": "Invoice not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/billing/invoices/{id}/payments": {
      "get": {
        "tags": [
          "payments"
        ],
        "summary": "GET /billing/invoices/:id/payments\nGet payment history for an invoice",
        "operationId": "get_payment_history",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Invoice ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payment history retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_PaymentHistory"
                }
              }
            }
          },
          "404": {
            "description": "Invoice not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/billing/payment-methods": {
      "get": {
        "tags": [
          "payments"
        ],
        "summary": "GET /billing/payment-methods\nList payment methods for the organization",
        "operationId": "list_payment_methods",
        "responses": {
          "200": {
            "description": "Payment methods retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Vec_PaymentMethod"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      },
      "post": {
        "tags": [
          "payments"
        ],
        "summary": "POST /billing/payment-methods\nAdd a payment method for the organization",
        "operationId": "add_payment_method",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddPaymentMethodRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Payment method added",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_PaymentMethodAdded"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/billing/payment-methods/{id}": {
      "delete": {
        "tags": [
          "payments"
        ],
        "summary": "DELETE /billing/payment-methods/{id}\nRemove a payment method from the organization",
        "operationId": "delete_payment_method",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Payment method ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Payment method removed"
          },
          "404": {
            "description": "Payment method not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/billing/publishers/{slug}/charges": {
      "post": {
        "tags": [
          "publisher-payments"
        ],
        "summary": "POST /billing/publishers/{slug}/charges",
        "operationId": "create_charge",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "description": "Publisher slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateChargeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Charge created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_PublisherChargeInfo"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Insufficient balance"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Publisher not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/billing/publishers/{slug}/charges/{charge_id}": {
      "get": {
        "tags": [
          "publisher-payments"
        ],
        "summary": "GET /billing/publishers/{slug}/charges/{charge_id}",
        "operationId": "get_charge_status",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "description": "Publisher slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "charge_id",
            "in": "path",
            "description": "Charge ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Charge retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_PublisherChargeInfo"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Charge not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/billing/publishers/{slug}/charges/{charge_id}/refund": {
      "post": {
        "tags": [
          "publisher-payments"
        ],
        "summary": "POST /billing/publishers/{slug}/charges/{charge_id}/refund",
        "operationId": "refund_charge",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "description": "Publisher slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "charge_id",
            "in": "path",
            "description": "Charge ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefundChargeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Charge refunded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_PublisherChargeInfo"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Charge not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/billing/publishers/{slug}/charges/{charge_id}/slash": {
      "post": {
        "tags": [
          "publisher-payments"
        ],
        "summary": "POST /billing/publishers/{slug}/charges/{charge_id}/slash",
        "operationId": "slash_charge",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "description": "Publisher slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "charge_id",
            "in": "path",
            "description": "Original charge ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SlashChargeRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "204": {
            "description": "Slash applied"
          },
          "401": {
            "description": "Unauthorized"
          },
          "402": {
            "description": "Insufficient balance"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Charge not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/billing/publishers/{slug}/payouts": {
      "post": {
        "tags": [
          "publisher-payments"
        ],
        "summary": "POST /billing/publishers/{slug}/payouts",
        "operationId": "create_payout",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "description": "Publisher slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePayoutRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Payout created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_PublisherPayoutInfo"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Publisher not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/billing/publishers/{slug}/payouts/{payout_id}": {
      "get": {
        "tags": [
          "publisher-payments"
        ],
        "summary": "GET /billing/publishers/{slug}/payouts/{payout_id}",
        "operationId": "get_payout_status",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "description": "Publisher slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "payout_id",
            "in": "path",
            "description": "Payout ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payout retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_PublisherPayoutInfo"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Payout not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/billing/usage/{organization_id}": {
      "get": {
        "tags": [
          "billing"
        ],
        "summary": "GET /billing/usage/:organization_id\nGet usage summary for an organization",
        "operationId": "get_usage_summary",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "start_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Usage summary retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Vec_UsageSummary"
                }
              }
            }
          },
          "404": {
            "description": "Organization not found"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/databases": {
      "get": {
        "tags": [
          "Databases"
        ],
        "summary": "List all databases across all projects for the authenticated user",
        "description": "Returns all databases the user has access to, with project and branch context included.\nThis provides a single view of all databases without needing to query each project/branch separately.",
        "operationId": "list_all_databases",
        "responses": {
          "200": {
            "description": "List of all databases with context",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Vec_DatabaseWithContext"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/eval/matrix": {
      "get": {
        "tags": [
          "Eval"
        ],
        "summary": "Get the global eval routing matrix.",
        "operationId": "get_matrix",
        "responses": {
          "200": {
            "description": "Eval matrix",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_EvalMatrixResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/eval/signals": {
      "post": {
        "tags": [
          "Eval"
        ],
        "summary": "Ingest eval signals from Seren Desktop clients.",
        "operationId": "post_signals",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EvalSignalRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Signals accepted",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_EvalSignalResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/federation": {
      "get": {
        "tags": [
          "federation"
        ],
        "summary": "GET /federation\nList federated resources with optional filtering.\nUsed for cross-publisher resource discovery.",
        "operationId": "list_resources",
        "parameters": [
          {
            "name": "publisher_slug",
            "in": "query",
            "description": "Filter by publisher slug",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "resource_type",
            "in": "query",
            "description": "Filter by resource type (e.g., \"bounty\", \"dataset\")",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filter by status (default: \"active\")",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of results (default: 50, max: 100)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset for pagination",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Resources retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Vec_FederatedResourceWithPublisherResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid query parameters"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      },
      "post": {
        "tags": [
          "federation"
        ],
        "summary": "POST /federation\nUpsert a federated resource for a publisher.\nPublishers use this to register/update their resources for cross-publisher discovery.",
        "operationId": "upsert_resource",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpsertFederatedResourceRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Resource upserted successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_FederatedResourceResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Not authorized - must be a publisher"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/federation/history": {
      "get": {
        "tags": [
          "federation"
        ],
        "summary": "GET /federation/history\nList append-only federation history events.",
        "operationId": "list_history",
        "parameters": [
          {
            "name": "publisher_slug",
            "in": "query",
            "description": "Filter by publisher slug",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "resource_type",
            "in": "query",
            "description": "Filter by resource type",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "external_id",
            "in": "query",
            "description": "Filter by external resource ID",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "operation",
            "in": "query",
            "description": "Filter by history operation: insert, update, delete",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of results (default: 50, max: 100)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset for pagination",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "History retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Vec_FederatedResourceHistoryResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid query parameters"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/federation/history/stats": {
      "get": {
        "tags": [
          "federation"
        ],
        "summary": "GET /federation/history/stats\nGet aggregate statistics over federation history.",
        "operationId": "get_history_stats",
        "parameters": [
          {
            "name": "publisher_slug",
            "in": "query",
            "description": "Filter by publisher slug (optional)",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "resource_type",
            "in": "query",
            "description": "Filter by resource type (optional)",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "History stats retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_FederationHistoryStatsResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/federation/stats": {
      "get": {
        "tags": [
          "federation"
        ],
        "summary": "GET /federation/stats\nGet federation statistics, optionally filtered by publisher.",
        "operationId": "get_stats",
        "parameters": [
          {
            "name": "publisher_slug",
            "in": "query",
            "description": "Filter by publisher slug (optional - if omitted, returns stats across all publishers)",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Stats retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_FederationStatsResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/federation/{id}": {
      "get": {
        "tags": [
          "federation"
        ],
        "summary": "GET /federation/{id}\nGet a specific federated resource by ID.",
        "operationId": "get_resource",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "description": "Federated resource ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Resource retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_FederatedResourceResponse"
                }
              }
            }
          },
          "404": {
            "description": "Resource not found"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/federation/{resource_type}/{external_id}": {
      "delete": {
        "tags": [
          "federation"
        ],
        "summary": "DELETE /federation/{resource_type}/{external_id}\nDelete a federated resource by type and external ID.\nOnly the owning publisher can delete their resources.",
        "operationId": "delete_resource",
        "parameters": [
          {
            "name": "resource_type",
            "in": "path",
            "description": "Resource type",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "external_id",
            "in": "path",
            "description": "External resource ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Resource deleted successfully"
          },
          "401": {
            "description": "Authentication required"
          },
          "403": {
            "description": "Not authorized to delete this resource"
          },
          "404": {
            "description": "Resource not found"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/oauth/connections": {
      "get": {
        "tags": [
          "OAuth"
        ],
        "summary": "List user's OAuth connections",
        "description": "Returns all OAuth providers the user has connected to.",
        "operationId": "list_connections",
        "responses": {
          "200": {
            "description": "List of user's OAuth connections",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ConnectionsResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/oauth/connections/providers/{provider_id}": {
      "delete": {
        "tags": [
          "OAuth"
        ],
        "summary": "Revoke an OAuth connection by provider ID (supports org-scoped providers)",
        "operationId": "revoke_connection_by_id",
        "parameters": [
          {
            "name": "provider_id",
            "in": "path",
            "description": "OAuth provider UUID to disconnect",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Connection revoked successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RevokeResponse"
                }
              }
            }
          },
          "404": {
            "description": "Connection not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/oauth/connections/{provider}": {
      "delete": {
        "tags": [
          "OAuth"
        ],
        "summary": "Revoke an OAuth connection",
        "description": "Disconnects the user's account from the OAuth provider and deletes stored tokens.",
        "operationId": "revoke_connection",
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "description": "OAuth provider slug to disconnect",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Connection revoked successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/RevokeResponse"
                }
              }
            }
          },
          "404": {
            "description": "Connection not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/oauth/providers": {
      "get": {
        "tags": [
          "OAuth"
        ],
        "summary": "List available OAuth providers",
        "description": "Returns all active OAuth providers that users can connect to,\nincluding global providers and providers from organizations the user belongs to.",
        "operationId": "list_providers",
        "responses": {
          "200": {
            "description": "List of available OAuth providers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProvidersResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/oauth/providers/{provider_id}/authorize": {
      "get": {
        "tags": [
          "OAuth"
        ],
        "summary": "Initiate OAuth authorization flow by provider ID (supports org-scoped providers)",
        "operationId": "initiate_oauth_by_id",
        "parameters": [
          {
            "name": "provider_id",
            "in": "path",
            "description": "OAuth provider UUID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "redirect_uri",
            "in": "query",
            "description": "Where to redirect after OAuth completes",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "302": {
            "description": "Redirect to OAuth provider"
          },
          "404": {
            "description": "Provider not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/oauth/providers/{provider_id}/callback": {
      "get": {
        "tags": [
          "OAuth"
        ],
        "summary": "Handle OAuth callback by provider ID (supports org-scoped providers)",
        "operationId": "oauth_callback_by_id",
        "parameters": [
          {
            "name": "provider_id",
            "in": "path",
            "description": "OAuth provider UUID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "code",
            "in": "query",
            "description": "Authorization code from provider",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "State parameter for CSRF verification",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "302": {
            "description": "Redirect to frontend with success/error"
          },
          "400": {
            "description": "Invalid callback parameters"
          },
          "404": {
            "description": "Provider not found"
          }
        }
      }
    },
    "/oauth/{provider}/authorize": {
      "get": {
        "tags": [
          "OAuth"
        ],
        "summary": "Initiate OAuth authorization flow",
        "description": "Redirects the user to the OAuth provider's consent screen.\nAfter authorization, the provider will redirect back to the callback URL.",
        "operationId": "initiate_oauth",
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "description": "OAuth provider slug (e.g., 'neon')",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "redirect_uri",
            "in": "query",
            "description": "Where to redirect after OAuth completes",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "302": {
            "description": "Redirect to OAuth provider"
          },
          "404": {
            "description": "Provider not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/oauth/{provider}/callback": {
      "get": {
        "tags": [
          "OAuth"
        ],
        "summary": "Handle OAuth callback",
        "description": "Called by the OAuth provider after the user authorizes.\nExchanges the authorization code for tokens and stores them.",
        "operationId": "oauth_callback",
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "description": "OAuth provider slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "code",
            "in": "query",
            "description": "Authorization code from provider",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "description": "State parameter for CSRF verification",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "302": {
            "description": "Redirect to frontend with success/error"
          },
          "400": {
            "description": "Invalid callback parameters"
          }
        }
      }
    },
    "/organizations": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "GET /organizations\nList all organizations for the authenticated user",
        "operationId": "list_organizations",
        "responses": {
          "200": {
            "description": "List of organizations",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Vec_Organization"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/organizations/default/api-keys": {
      "get": {
        "tags": [
          "Auth"
        ],
        "summary": "List API keys for the user's default organization",
        "operationId": "list_default_org_api_keys",
        "responses": {
          "200": {
            "description": "List of API keys",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Vec_ApiKeyInfo"
                }
              }
            }
          },
          "400": {
            "description": "User has no organization"
          },
          "401": {
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Create a new API key for the user's default organization",
        "description": "This is a convenience endpoint that resolves \"default\" to the user's\nfirst organization, avoiding an extra round-trip to /auth/me.",
        "operationId": "create_default_org_api_key",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "API key created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_ApiKeyCreated"
                }
              }
            }
          },
          "400": {
            "description": "User has no organization"
          },
          "401": {
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/organizations/default/api-keys/{key_id}": {
      "delete": {
        "tags": [
          "Auth"
        ],
        "summary": "Revoke an API key from the user's default organization",
        "operationId": "revoke_default_org_api_key",
        "parameters": [
          {
            "name": "key_id",
            "in": "path",
            "description": "API key ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "API key revoked"
          },
          "400": {
            "description": "User has no organization"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "API key not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/organizations/{organization_id}/agents/tasks": {
      "get": {
        "tags": [
          "Agent Tasks"
        ],
        "summary": "GET /organizations/{organization_id}/agents/tasks",
        "operationId": "list_tasks",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Tasks retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Vec_AgentTask"
                }
              }
            }
          },
          "403": {
            "description": "Not authorized"
          }
        }
      }
    },
    "/organizations/{organization_id}/agents/tasks/{task_id}": {
      "get": {
        "tags": [
          "Agent Tasks"
        ],
        "summary": "GET /organizations/{organization_id}/agents/tasks/{task_id}",
        "operationId": "get_task",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "task_id",
            "in": "path",
            "description": "Task ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Task retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_AgentTask"
                }
              }
            }
          },
          "404": {
            "description": "Task not found"
          }
        }
      }
    },
    "/organizations/{organization_id}/agents/tasks/{task_id}/cancel": {
      "post": {
        "tags": [
          "Agent Tasks"
        ],
        "summary": "POST /organizations/{organization_id}/agents/tasks/{task_id}/cancel",
        "operationId": "cancel_task",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "task_id",
            "in": "path",
            "description": "Task ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Task canceled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_AgentTask"
                }
              }
            }
          },
          "400": {
            "description": "Already terminal"
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/organizations/{organization_id}/agents/tasks/{task_id}/events": {
      "get": {
        "tags": [
          "Agent Tasks"
        ],
        "summary": "GET /organizations/{organization_id}/agents/tasks/{task_id}/events",
        "operationId": "list_task_events",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "task_id",
            "in": "path",
            "description": "Task ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Events retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Vec_AgentTaskEvent"
                }
              }
            }
          },
          "404": {
            "description": "Not found"
          }
        }
      }
    },
    "/organizations/{organization_id}/agents/tasks/{task_id}/stream": {
      "get": {
        "tags": [
          "Agent Tasks"
        ],
        "summary": "GET /organizations/{organization_id}/agents/tasks/{task_id}/stream",
        "operationId": "stream_task",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "task_id",
            "in": "path",
            "description": "Task ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "SSE event stream"
          }
        }
      }
    },
    "/organizations/{organization_id}/api-keys": {
      "get": {
        "tags": [
          "Auth"
        ],
        "summary": "List API keys for a specific organization",
        "operationId": "list_org_api_keys",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of API keys",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Vec_ApiKeyInfo"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Organization not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Auth"
        ],
        "summary": "Create a new API key for a specific organization",
        "operationId": "create_org_api_key",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateApiKeyRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "API key created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_ApiKeyCreated"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Organization not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/organizations/{organization_id}/api-keys/{key_id}": {
      "delete": {
        "tags": [
          "Auth"
        ],
        "summary": "Revoke an organization API key",
        "operationId": "revoke_org_api_key",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "key_id",
            "in": "path",
            "description": "API key ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "API key revoked"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "API key not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/organizations/{organization_id}/audit-logs": {
      "get": {
        "tags": [
          "Audit Logs"
        ],
        "summary": "List audit logs for an organization",
        "operationId": "list_audit_logs",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "actor_id",
            "in": "query",
            "description": "Filter by actor ID",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ],
              "format": "uuid"
            }
          },
          {
            "name": "action",
            "in": "query",
            "description": "Filter by action (e.g., \"project.create\")",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "resource_type",
            "in": "query",
            "description": "Filter by resource type (e.g., \"project\", \"branch\")",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "resource_id",
            "in": "query",
            "description": "Filter by resource ID",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ],
              "format": "uuid"
            }
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filter by status",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "action_category",
            "in": "query",
            "description": "Filter by action category",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "start_date",
            "in": "query",
            "description": "Filter by start date (ISO 8601)",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "description": "Filter by end date (ISO 8601)",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of results (default 50, max 100)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset for pagination",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Audit logs retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_AuditLogList"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden - not a member of this organization"
          },
          "404": {
            "description": "Organization not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/organizations/{organization_id}/audit-logs/{log_id}": {
      "get": {
        "tags": [
          "Audit Logs"
        ],
        "summary": "Get a specific audit log entry",
        "operationId": "get_audit_log",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "log_id",
            "in": "path",
            "description": "Audit log ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Audit log retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_AuditLog"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden - not a member of this organization"
          },
          "404": {
            "description": "Audit log not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/organizations/{organization_id}/billing/endpoints/{endpoint_id}/events": {
      "get": {
        "tags": [
          "billing"
        ],
        "summary": "GET /organizations/{organization_id}/billing/endpoints/{endpoint_id}/events\nDebug endpoint: show recent usage_events and compute_usage_events for an endpoint",
        "operationId": "get_endpoint_billing_events",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "endpoint_id",
            "in": "path",
            "description": "Endpoint ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Billing events retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_EndpointBillingEvents"
                }
              }
            }
          },
          "404": {
            "description": "Endpoint not found for organization"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/organizations/{organization_id}/consumption": {
      "get": {
        "tags": [
          "billing"
        ],
        "summary": "GET /organizations/{organization_id}/consumption\nAggregated organization-level consumption over a billing window.",
        "operationId": "get_organization_consumption",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "start_date",
            "in": "query",
            "description": "Optional ISO-8601 start date (YYYY-MM-DD), defaults to first day of current month.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "description": "Optional ISO-8601 end date (YYYY-MM-DD), defaults to today (UTC).",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Organization consumption retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_OrganizationConsumption"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "User is not a member of the organization"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/organizations/{organization_id}/invites": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "GET /organizations/{organization_id}/invites\nList pending and historical organization invites.",
        "operationId": "list_invites",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Organization invites retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Vec_OrganizationInvite"
                }
              }
            }
          },
          "403": {
            "description": "User is not allowed to view invites"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Organizations"
        ],
        "summary": "POST /organizations/{organization_id}/invites\nCreate a new organization invite and send an email via the configured mailer.",
        "operationId": "create_invite",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrganizationInviteRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Invite created and email sent",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_OrganizationInvite"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "403": {
            "description": "User is not allowed to create invites"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/organizations/{organization_id}/members": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "GET /organizations/{organization_id}/members\nList organization members with basic user details.",
        "operationId": "list_members",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Organization members retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Vec_OrganizationMemberWithUser"
                }
              }
            }
          },
          "403": {
            "description": "User is not a member of the organization"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/organizations/{organization_id}/members/{member_id}/role": {
      "put": {
        "tags": [
          "RBAC"
        ],
        "summary": "Assign a role to an organization member",
        "operationId": "assign_role",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "member_id",
            "in": "path",
            "description": "Member user ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignRoleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Role assigned successfully"
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden - requires org.manage_members permission"
          },
          "404": {
            "description": "Member or role not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/organizations/{organization_id}/oauth/providers": {
      "get": {
        "tags": [
          "oauth-providers"
        ],
        "summary": "GET /organizations/{organization_id}/oauth/providers",
        "description": "List all OAuth providers for an organization.",
        "operationId": "list_org_oauth_providers",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of OAuth providers",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Vec_OAuthProviderResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden - not a member of the organization"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      },
      "post": {
        "tags": [
          "oauth-providers"
        ],
        "summary": "POST /organizations/{organization_id}/oauth/providers",
        "description": "Create a new OAuth provider for an organization.",
        "operationId": "create_org_oauth_provider",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOAuthProviderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "OAuth provider created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_OAuthProviderResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden - not a member of the organization"
          },
          "409": {
            "description": "Conflict - provider with this slug already exists"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/organizations/{organization_id}/oauth/providers/{provider_id}": {
      "get": {
        "tags": [
          "oauth-providers"
        ],
        "summary": "GET /organizations/{organization_id}/oauth/providers/{provider_id}",
        "description": "Get a specific OAuth provider for an organization.",
        "operationId": "get_org_oauth_provider",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "provider_id",
            "in": "path",
            "description": "OAuth provider ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OAuth provider details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_OAuthProviderResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden - not a member of the organization"
          },
          "404": {
            "description": "Provider not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "oauth-providers"
        ],
        "summary": "DELETE /organizations/{organization_id}/oauth/providers/{provider_id}",
        "description": "Delete an OAuth provider for an organization.",
        "operationId": "delete_org_oauth_provider",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "provider_id",
            "in": "path",
            "description": "OAuth provider ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "OAuth provider deleted"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden - not a member of the organization"
          },
          "404": {
            "description": "Provider not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      },
      "patch": {
        "tags": [
          "oauth-providers"
        ],
        "summary": "PATCH /organizations/{organization_id}/oauth/providers/{provider_id}",
        "description": "Update an OAuth provider for an organization.",
        "operationId": "update_org_oauth_provider",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "provider_id",
            "in": "path",
            "description": "OAuth provider ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateOAuthProviderRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "OAuth provider updated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_OAuthProviderResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden - not a member of the organization"
          },
          "404": {
            "description": "Provider not found"
          },
          "409": {
            "description": "Conflict - provider with this slug already exists"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/organizations/{organization_id}/permissions/check/{permission}": {
      "get": {
        "tags": [
          "RBAC"
        ],
        "summary": "Check if the current user has a specific permission",
        "operationId": "check_permission",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "permission",
            "in": "path",
            "description": "Permission name to check",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Permission check result",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_bool"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden - not a member of this organization"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/organizations/{organization_id}/permissions/mine": {
      "get": {
        "tags": [
          "RBAC"
        ],
        "summary": "Get current user's permissions in an organization",
        "operationId": "get_my_permissions",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "User's permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Vec_String"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden - not a member of this organization"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/organizations/{organization_id}/plan": {
      "get": {
        "tags": [
          "Plans"
        ],
        "summary": "GET /organizations/:org_id/plan\nGet the current plan for an organization",
        "operationId": "get_organization_plan",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Organization plan retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_OrganizationPlanWithDetails"
                }
              }
            }
          },
          "404": {
            "description": "Organization or plan not found"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      },
      "post": {
        "tags": [
          "Plans"
        ],
        "summary": "POST /organizations/:org_id/plan\nUpgrade or downgrade an organization's plan",
        "operationId": "change_organization_plan",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChangePlanRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Plan changed successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_OrganizationPlanWithDetails"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "404": {
            "description": "Organization or plan not found"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/organizations/{organization_id}/publishers": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "GET /organizations/:org_id/publishers\nList publishers owned by an organization",
        "operationId": "list_org_publishers",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Publishers retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Vec_PublisherResponse"
                }
              }
            }
          },
          "403": {
            "description": "Not authorized"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      },
      "post": {
        "tags": [
          "Organizations"
        ],
        "summary": "POST /organizations/:org_id/publishers\nCreate a new publisher",
        "operationId": "create_publisher",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePublisherRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Publisher created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_PublisherResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "403": {
            "description": "Not authorized"
          },
          "409": {
            "description": "Publisher slug already exists"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/organizations/{organization_id}/publishers/{publisher_id}": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "GET /organizations/:org_id/publishers/:publisher_id\nGet publisher details",
        "operationId": "get_org_publisher",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "publisher_id",
            "in": "path",
            "description": "Publisher ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Publisher retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_PublisherResponse"
                }
              }
            }
          },
          "403": {
            "description": "Not authorized"
          },
          "404": {
            "description": "Publisher not found"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      },
      "put": {
        "tags": [
          "Organizations"
        ],
        "summary": "PUT /organizations/:org_id/publishers/:publisher_id\nUpdate a publisher",
        "operationId": "update_publisher",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "publisher_id",
            "in": "path",
            "description": "Publisher ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePublisherRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Publisher updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_PublisherResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "403": {
            "description": "Not authorized"
          },
          "404": {
            "description": "Publisher not found"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      },
      "delete": {
        "tags": [
          "Organizations"
        ],
        "summary": "DELETE /organizations/:org_id/publishers/:publisher_id\nSoft delete a publisher",
        "operationId": "delete_publisher",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "publisher_id",
            "in": "path",
            "description": "Publisher ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Publisher deleted successfully"
          },
          "403": {
            "description": "Not authorized"
          },
          "404": {
            "description": "Publisher not found"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/organizations/{organization_id}/publishers/{publisher_id}/analytics/revenue": {
      "get": {
        "tags": [
          "Agent Analytics"
        ],
        "summary": "GET /organizations/:org_id/publishers/:publisher_id/analytics/revenue\nGet revenue metrics with period-over-period comparison.",
        "operationId": "get_revenue_metrics",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "publisher_id",
            "in": "path",
            "description": "Publisher ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "days",
            "in": "query",
            "description": "Number of days to analyze (default: 30)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Revenue metrics",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_RevenueMetrics"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Publisher not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/organizations/{organization_id}/publishers/{publisher_id}/analytics/revenue-by-day": {
      "get": {
        "tags": [
          "Agent Analytics"
        ],
        "summary": "GET /organizations/:org_id/publishers/:publisher_id/analytics/revenue-by-day\nGet daily revenue breakdown.",
        "operationId": "get_revenue_by_day",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "publisher_id",
            "in": "path",
            "description": "Publisher ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "days",
            "in": "query",
            "description": "Number of days to analyze (default: 30)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Daily revenue breakdown",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Vec_RevenueByDay"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Publisher not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/organizations/{organization_id}/publishers/{publisher_id}/analytics/top-agents": {
      "get": {
        "tags": [
          "Agent Analytics"
        ],
        "summary": "GET /organizations/:org_id/publishers/:publisher_id/analytics/top-agents\nGet top agents by spending.",
        "operationId": "get_top_agents",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "publisher_id",
            "in": "path",
            "description": "Publisher ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Number of agents to return (default: 10)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int32"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Top agents by spending",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Vec_TopAgent"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Publisher not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/organizations/{organization_id}/publishers/{publisher_id}/earnings": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "GET /organizations/:org_id/publishers/:publisher_id/earnings\nList earnings for a publisher (per asset).",
        "operationId": "get_org_publisher_earnings",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "publisher_id",
            "in": "path",
            "description": "Publisher ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Earnings retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Vec_PublisherEarningsResponse"
                }
              }
            }
          },
          "403": {
            "description": "Not authorized"
          },
          "404": {
            "description": "Publisher not found"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/organizations/{organization_id}/publishers/{publisher_id}/logo": {
      "post": {
        "tags": [
          "Organizations"
        ],
        "summary": "POST /organizations/{organization_id}/publishers/{publisher_id}/logo\nUpload a logo for a publisher",
        "operationId": "upload_publisher_logo",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "publisher_id",
            "in": "path",
            "description": "Publisher ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/LogoUploadRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Logo uploaded successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_LogoUploadResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid image format or size"
          },
          "403": {
            "description": "Not authorized"
          },
          "404": {
            "description": "Publisher not found"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/organizations/{organization_id}/publishers/{publisher_id}/payouts": {
      "get": {
        "tags": [
          "Organizations"
        ],
        "summary": "GET /organizations/:org_id/publishers/:publisher_id/payouts\nList payout requests for a publisher.",
        "operationId": "list_org_publisher_payouts",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "publisher_id",
            "in": "path",
            "description": "Publisher ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of results (default: 50)",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset for pagination",
            "required": false,
            "schema": {
              "type": [
                "integer",
                "null"
              ],
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Payouts retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Vec_PublisherPayoutResponse"
                }
              }
            }
          },
          "403": {
            "description": "Not authorized"
          },
          "404": {
            "description": "Publisher not found"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      },
      "post": {
        "tags": [
          "Organizations"
        ],
        "summary": "POST /organizations/:org_id/publishers/:publisher_id/payouts\nRequest a payout for a publisher's earnings.",
        "operationId": "create_org_publisher_payout",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "publisher_id",
            "in": "path",
            "description": "Publisher ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePublisherPayoutRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Payout request created",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_PublisherPayoutResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "403": {
            "description": "Not authorized"
          },
          "404": {
            "description": "Publisher not found"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/organizations/{organization_id}/publishers/{publisher_id}/pricing": {
      "put": {
        "tags": [
          "Organizations"
        ],
        "summary": "PUT /organizations/:org_id/publishers/:publisher_id/pricing\nUpdate publisher pricing config for a specific asset",
        "operationId": "update_publisher_pricing",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "publisher_id",
            "in": "path",
            "description": "Publisher ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePricingRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Pricing updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_PricingConfigResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "403": {
            "description": "Not authorized"
          },
          "404": {
            "description": "Publisher not found"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/organizations/{organization_id}/quota": {
      "get": {
        "tags": [
          "Plans"
        ],
        "summary": "GET /organizations/:org_id/quota\nGet current quota usage for an organization",
        "operationId": "get_quota_usage",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Quota usage retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_QuotaUsage"
                }
              }
            }
          },
          "404": {
            "description": "Organization or plan not found"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/organizations/{organization_id}/roles": {
      "get": {
        "tags": [
          "RBAC"
        ],
        "summary": "List roles for an organization (includes built-in roles)",
        "operationId": "list_organization_roles",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Roles retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Vec_RbacRole"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden - not a member of this organization"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      },
      "post": {
        "tags": [
          "RBAC"
        ],
        "summary": "Create a custom role",
        "operationId": "create_organization_role",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateRoleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Role created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_RbacRole"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden - requires org.manage_roles permission"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/organizations/{organization_id}/roles/{role_id}": {
      "get": {
        "tags": [
          "RBAC"
        ],
        "summary": "Get a specific role",
        "operationId": "get_role",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "role_id",
            "in": "path",
            "description": "Role ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Role retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_RbacRole"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden - not a member of this organization"
          },
          "404": {
            "description": "Role not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "RBAC"
        ],
        "summary": "Delete a custom role",
        "operationId": "delete_organization_role",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "role_id",
            "in": "path",
            "description": "Role ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Role deleted successfully"
          },
          "400": {
            "description": "Cannot delete built-in role"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden - requires org.manage_roles permission"
          },
          "404": {
            "description": "Role not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      },
      "patch": {
        "tags": [
          "RBAC"
        ],
        "summary": "Update a custom role",
        "operationId": "update_role",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "role_id",
            "in": "path",
            "description": "Role ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRoleRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Role updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_RbacRole"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request or cannot modify built-in role"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden - requires org.manage_roles permission"
          },
          "404": {
            "description": "Role not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/organizations/{organization_id}/templates/analytics/{publisher_id}": {
      "get": {
        "tags": [
          "templates"
        ],
        "summary": "GET /organizations/{organization_id}/templates/analytics/{publisher_id}\nGet template analytics for a specific publisher",
        "operationId": "get_publisher_template_analytics",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "publisher_id",
            "in": "path",
            "description": "Publisher ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Analytics retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_PublisherAnalytics"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Not authorized"
          },
          "404": {
            "description": "Publisher not found"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/organizations/{organization_id}/vpc-endpoints": {
      "get": {
        "tags": [
          "VPC"
        ],
        "operationId": "list_org_vpc_endpoints",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "region",
            "in": "query",
            "description": "Filter endpoints by region",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of VPC endpoints",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Vec_OrganizationVpcEndpoint"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Organization not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      },
      "post": {
        "tags": [
          "VPC"
        ],
        "operationId": "create_org_vpc_endpoint",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrganizationVpcEndpointRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "VPC endpoint recorded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_OrganizationVpcEndpoint"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/organizations/{organization_id}/vpc-endpoints/{endpoint_id}": {
      "get": {
        "tags": [
          "VPC"
        ],
        "operationId": "get_org_vpc_endpoint",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "endpoint_id",
            "in": "path",
            "description": "Organization VPC endpoint ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "VPC endpoint details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_OrganizationVpcEndpoint"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "VPC endpoint not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "VPC"
        ],
        "operationId": "delete_org_vpc_endpoint",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "endpoint_id",
            "in": "path",
            "description": "Organization VPC endpoint ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "VPC endpoint removed"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "VPC endpoint not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/organizations/{organization_id}/vpc/region/{region_id}/vpc_endpoints": {
      "get": {
        "tags": [
          "VPC"
        ],
        "summary": "List VPC endpoints for an organization filtered by region (alias path)",
        "operationId": "list_org_vpc_endpoints_by_region",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "region_id",
            "in": "path",
            "description": "Region",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of VPC endpoints",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Vec_OrganizationVpcEndpoint"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Organization not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/organizations/{organization_id}/vpc/region/{region_id}/vpc_endpoints/{endpoint_id}": {
      "get": {
        "tags": [
          "VPC"
        ],
        "summary": "Get VPC endpoint details with region in path (alias)",
        "operationId": "get_org_vpc_endpoint_by_region",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "region_id",
            "in": "path",
            "description": "Region",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "endpoint_id",
            "in": "path",
            "description": "Organization VPC endpoint ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "VPC endpoint details",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_OrganizationVpcEndpoint"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "VPC endpoint not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "VPC"
        ],
        "summary": "Delete VPC endpoint with region in path (alias)",
        "operationId": "delete_org_vpc_endpoint_by_region",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "region_id",
            "in": "path",
            "description": "Region",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "endpoint_id",
            "in": "path",
            "description": "Organization VPC endpoint ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "VPC endpoint removed"
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "VPC endpoint not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/organizations/{organization_id}/vpc/vpc_endpoints": {
      "get": {
        "tags": [
          "VPC"
        ],
        "summary": "List VPC endpoints for an organization (alias path with underscores)",
        "operationId": "list_org_vpc_endpoints_alias",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "List of VPC endpoints",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Vec_OrganizationVpcEndpoint"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Organization not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/organizations/{organization_id}/webhooks": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "List webhooks for an organization",
        "operationId": "list_webhooks",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Webhooks retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Vec_WebhookInfo"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden - not a member of this organization"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      },
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Create a webhook",
        "operationId": "create_webhook",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWebhookRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Webhook created successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_WebhookCreated"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden - not a member of this organization"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/organizations/{organization_id}/webhooks/{webhook_id}": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Get a specific webhook",
        "operationId": "get_webhook",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "webhook_id",
            "in": "path",
            "description": "Webhook ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Webhook retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_WebhookInfo"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden - not a member of this organization"
          },
          "404": {
            "description": "Webhook not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Delete a webhook",
        "operationId": "delete_webhook",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "webhook_id",
            "in": "path",
            "description": "Webhook ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Webhook deleted successfully"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden - not a member of this organization"
          },
          "404": {
            "description": "Webhook not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      },
      "patch": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Update a webhook",
        "operationId": "update_webhook",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "webhook_id",
            "in": "path",
            "description": "Webhook ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWebhookRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Webhook updated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_WebhookInfo"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden - not a member of this organization"
          },
          "404": {
            "description": "Webhook not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/organizations/{organization_id}/webhooks/{webhook_id}/deliveries": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "List recent deliveries for a webhook",
        "operationId": "list_webhook_deliveries",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "webhook_id",
            "in": "path",
            "description": "Webhook ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Deliveries retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Vec_WebhookDelivery"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden - not a member of this organization"
          },
          "404": {
            "description": "Webhook not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/organizations/{organization_id}/webhooks/{webhook_id}/rotate-secret": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Regenerate webhook secret",
        "operationId": "rotate_webhook_secret",
        "parameters": [
          {
            "name": "organization_id",
            "in": "path",
            "description": "Organization ID or 'default' for authenticated user's default organization",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "webhook_id",
            "in": "path",
            "description": "Webhook ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Secret rotated successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_WebhookCreated"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden - not a member of this organization"
          },
          "404": {
            "description": "Webhook not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/payments/supported": {
      "get": {
        "tags": [
          "payments"
        ],
        "summary": "GET /payments/supported\nReturns supported x402 payment kinds for facilitator discovery.",
        "operationId": "get_supported",
        "responses": {
          "200": {
            "description": "Supported payment kinds",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SupportedResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/permissions": {
      "get": {
        "tags": [
          "RBAC"
        ],
        "summary": "List all permissions",
        "operationId": "list_permissions",
        "responses": {
          "200": {
            "description": "Permissions retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Vec_Permission"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/plans": {
      "get": {
        "tags": [
          "Plans"
        ],
        "summary": "GET /plans\nList all available subscription plans",
        "operationId": "list_plans",
        "responses": {
          "200": {
            "description": "Plans retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Vec_Plan"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/plans/{plan_id}": {
      "get": {
        "tags": [
          "Plans"
        ],
        "summary": "GET /plans/:plan_id\nGet details of a specific plan",
        "operationId": "get_plan",
        "parameters": [
          {
            "name": "plan_id",
            "in": "path",
            "description": "Plan ID",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Plan retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Plan"
                }
              }
            }
          },
          "404": {
            "description": "Plan not found"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/publishers": {
      "get": {
        "tags": [
          "publishers"
        ],
        "summary": "GET /publishers\nList publishers with full details and pricing (store view)",
        "operationId": "list_store_publishers",
        "parameters": [
          {
            "name": "is_verified",
            "in": "query",
            "description": "Filter by verification status",
            "required": false,
            "schema": {
              "type": [
                "boolean",
                "null"
              ]
            }
          },
          {
            "name": "category",
            "in": "query",
            "description": "Filter by publisher category",
            "required": false,
            "schema": {
              "oneOf": [
                {
                  "type": "null"
                },
                {
                  "$ref": "#/components/schemas/PublisherCategory"
                }
              ]
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Search by name or slug",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of results (default: 50, max: 100)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset for pagination",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Publishers retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaginatedResponse_Vec_PublisherResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid query parameters"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/publishers/suggest": {
      "get": {
        "tags": [
          "publishers"
        ],
        "summary": "GET /publishers/suggest\nSuggest publishers based on a task or query",
        "operationId": "suggest_publishers",
        "parameters": [
          {
            "name": "query",
            "in": "query",
            "description": "The task or query to match against publisher capabilities.\nExamples: \"scrape website\", \"AI research\", \"PDF extraction\"",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "type",
            "in": "query",
            "description": "Type of suggestions: \"publisher\", \"agent\", or \"both\" (default: \"both\")\nNote: Agent suggestions are planned but not yet implemented.",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of results (default: 5, max: 20)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Publisher suggestions retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_SuggestResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid query parameters"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/publishers/{slug}": {
      "get": {
        "tags": [
          "publishers"
        ],
        "summary": "GET /publishers/{slug}\nGet publisher by slug (store view with full details)",
        "operationId": "get_store_publisher",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "description": "Publisher slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Publisher retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_PublisherResponse"
                }
              }
            }
          },
          "404": {
            "description": "Publisher not found"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      },
      "post": {
        "tags": [
          "publishers"
        ],
        "summary": "Handle requests to the publisher root.",
        "description": "For database publishers, this executes a query from the request body.\nFor API publishers, this proxies to the root endpoint.\nFor agent publishers (compute_type=agent), this creates a task and returns 202 Accepted.\nFor MCP publishers, this returns an error (use specific tool/resource endpoints).",
        "operationId": "publisher_root_handler",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "description": "Publisher slug identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublisherRootRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Request processed successfully (database/API)",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "202": {
            "description": "Agent task accepted (async)",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "402": {
            "description": "Payment required"
          },
          "404": {
            "description": "Publisher not found"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/publishers/{slug}/estimate": {
      "post": {
        "tags": [
          "publishers"
        ],
        "summary": "Estimate query cost without payment",
        "operationId": "estimate_query",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "description": "Publisher slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EstimateRequestBody"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Cost estimate",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/EstimateResponse"
                }
              }
            }
          },
          "404": {
            "description": "Publisher not found"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/publishers/{slug}/logo": {
      "get": {
        "tags": [
          "publishers"
        ],
        "summary": "GET /publishers/{slug}/logo\nFetch publisher logo (inline data or redirect to URL)\nAccepts either publisher slug or UUID for backwards compatibility",
        "operationId": "get_store_publisher_logo",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "description": "Publisher slug or UUID",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Publisher logo bytes"
          },
          "302": {
            "description": "Redirect to external logo URL"
          },
          "404": {
            "description": "Logo not found"
          }
        }
      }
    },
    "/publishers/{slug}/{path}": {
      "get": {
        "tags": [
          "publishers"
        ],
        "operationId": "proxy_to_publisher_get",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "description": "Publisher slug identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "path",
            "description": "Path to proxy to the publisher",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/octet-stream": {
              "schema": {}
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Request proxied successfully",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "402": {
            "description": "Payment required"
          },
          "403": {
            "description": "Publisher is geo-restricted and routing is not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeoRestrictedError"
                }
              }
            }
          },
          "404": {
            "description": "Publisher or endpoint not found"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      },
      "post": {
        "tags": [
          "publishers"
        ],
        "operationId": "proxy_to_publisher_post",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "description": "Publisher slug identifier",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "path",
            "in": "path",
            "description": "Path to proxy to the publisher",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/octet-stream": {
              "schema": {}
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Request proxied successfully",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "402": {
            "description": "Payment required"
          },
          "403": {
            "description": "Publisher is geo-restricted and routing is not enabled",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GeoRestrictedError"
                }
              }
            }
          },
          "404": {
            "description": "Publisher or endpoint not found"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/sessions": {
      "get": {
        "tags": [
          "Sessions"
        ],
        "summary": "List all active sessions for the current user",
        "operationId": "list_sessions",
        "responses": {
          "200": {
            "description": "Sessions retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Vec_Session"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/sessions/revoke-all": {
      "post": {
        "tags": [
          "Sessions"
        ],
        "summary": "Revoke all sessions (logout everywhere)",
        "operationId": "revoke_all_sessions",
        "responses": {
          "200": {
            "description": "All sessions revoked successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_SessionsRevoked"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/sessions/{session_id}": {
      "delete": {
        "tags": [
          "Sessions"
        ],
        "summary": "Revoke a specific session",
        "operationId": "revoke_session",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID to revoke",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Session revoked successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_SessionsRevoked"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Session not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/sessions/{session_id}/revoke-others": {
      "post": {
        "tags": [
          "Sessions"
        ],
        "summary": "Revoke all sessions except a specified one",
        "operationId": "revoke_other_sessions",
        "parameters": [
          {
            "name": "session_id",
            "in": "path",
            "description": "Session ID to keep (current session)",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Other sessions revoked successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_SessionsRevoked"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "404": {
            "description": "Session not found or doesn't belong to user"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/templates": {
      "get": {
        "tags": [
          "templates"
        ],
        "summary": "GET /templates\nList available templates in the catalog",
        "operationId": "list_templates",
        "parameters": [
          {
            "name": "verified_only",
            "in": "query",
            "description": "Filter to verified templates only",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "language",
            "in": "query",
            "description": "Filter by language (python, typescript, javascript)",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "min_price",
            "in": "query",
            "description": "Minimum price in atomic units",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "max_price",
            "in": "query",
            "description": "Maximum price in atomic units",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Search in name and description",
            "required": false,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort_by",
            "in": "query",
            "description": "Sort order (popularity, price_asc, price_desc, newest, oldest)",
            "required": false,
            "schema": {
              "$ref": "#/components/schemas/TemplateSortBy"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of templates to return (default: 50)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset for pagination (default: 0)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Templates retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Vec_AgentTemplateSummary"
                }
              }
            }
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/templates/publish": {
      "post": {
        "tags": [
          "templates"
        ],
        "summary": "POST /templates/publish\nPublish a new agent template",
        "operationId": "publish_template",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTemplateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "201": {
            "description": "Template published successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_CreateTemplateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Authentication required"
          },
          "409": {
            "description": "Template slug already exists"
          },
          "500": {
            "description": "Internal server error"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/templates/{slug}": {
      "get": {
        "tags": [
          "templates"
        ],
        "summary": "GET /templates/{slug}\nGet template details by slug",
        "operationId": "get_template",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "description": "Template slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Template retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_CreateTemplateResponse"
                }
              }
            }
          },
          "404": {
            "description": "Template not found"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/templates/{slug}/invoke": {
      "post": {
        "tags": [
          "templates"
        ],
        "summary": "POST /templates/{slug}/invoke\nInvoke an agent template.",
        "description": "Supports two modes:\n- **Bearer auth present**: uses the authenticated user's SerenBucks balance.\n- **No bearer auth**: uses x402 (requires `X-AGENT-WALLET` + payment headers).",
        "operationId": "invoke_template",
        "parameters": [
          {
            "name": "slug",
            "in": "path",
            "description": "Template slug",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvokeTemplateRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Template invoked successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_InvokeTemplateResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Authentication failed"
          },
          "402": {
            "description": "Payment required"
          },
          "404": {
            "description": "Template not found"
          },
          "500": {
            "description": "Internal server error"
          },
          "503": {
            "description": "Sandbox execution failed"
          }
        }
      }
    },
    "/wallet/balance": {
      "get": {
        "tags": [
          "agent-wallet"
        ],
        "summary": "Get wallet balance (funded + promotional)",
        "operationId": "get_wallet_balance",
        "responses": {
          "200": {
            "description": "Wallet balance retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_WalletBalanceResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/wallet/bonus/payment-method": {
      "post": {
        "tags": [
          "agent-wallet"
        ],
        "summary": "Claim payment method bonus (if not already claimed)",
        "operationId": "claim_payment_method_bonus",
        "responses": {
          "200": {
            "description": "Payment method bonus claimed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_BonusClaimResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Recovery setup required"
          },
          "409": {
            "description": "Bonus already claimed"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/wallet/bonus/signup": {
      "post": {
        "tags": [
          "agent-wallet"
        ],
        "summary": "Claim signup bonus (if not already claimed)",
        "operationId": "claim_signup_bonus",
        "responses": {
          "200": {
            "description": "Signup bonus claimed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_BonusClaimResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Recovery setup required"
          },
          "409": {
            "description": "Bonus already claimed"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/wallet/daily/claim": {
      "post": {
        "tags": [
          "agent-wallet"
        ],
        "summary": "Claim daily free credits",
        "operationId": "claim_daily",
        "responses": {
          "200": {
            "description": "Daily credits claimed",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_DailyClaimResponse"
                }
              }
            }
          },
          "400": {
            "description": "Not eligible for daily claim"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Recovery setup required"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/wallet/daily/eligibility": {
      "get": {
        "tags": [
          "agent-wallet"
        ],
        "summary": "Check if user can claim daily credits",
        "operationId": "check_daily_eligibility",
        "responses": {
          "200": {
            "description": "Eligibility checked",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_DailyClaimEligibilityResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/wallet/deposit": {
      "post": {
        "tags": [
          "agent-wallet"
        ],
        "summary": "Deposit funds via Stripe",
        "operationId": "create_deposit",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DepositRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Deposit initiated",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_DepositResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Recovery setup required"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/wallet/deposit/crypto": {
      "post": {
        "tags": [
          "agent-wallet"
        ],
        "summary": "Deposit configured asset via on-chain payment flow",
        "description": "Allows agents to deposit the configured asset directly on-chain to their prepaid balance.\nFollows the 402 payment protocol:\n1. First request (no payment header) returns 402 with payment requirements\n2. Second request (with payment header) settles on-chain and credits balance",
        "operationId": "onchain_deposit",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/OnchainDepositRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Deposit successful",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/OnchainDepositResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "402": {
            "description": "Payment required",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentRequiredResponseWithInfo"
                }
              }
            }
          },
          "404": {
            "description": "Publisher not found"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/wallet/lookup/{agent_wallet}": {
      "get": {
        "tags": [
          "publisher-payments"
        ],
        "summary": "GET /wallet/lookup/{agent_wallet}\nLook up an agent's available balance (for publisher pre-checks)",
        "operationId": "get_agent_balance",
        "parameters": [
          {
            "name": "agent_wallet",
            "in": "path",
            "description": "Agent wallet address",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Balance retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_PublisherAgentBalance"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Publisher not found"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/wallet/recover": {
      "post": {
        "tags": [
          "agent-wallet"
        ],
        "summary": "POST /wallet/recover\nRecover an agent account using a recovery code.",
        "description": "This endpoint allows agents who have lost their API key to recover their account\nusing the recovery code they saved when setting up wallet recovery.\n\n**What this does:**\n- Verifies the recovery code\n- Revokes all existing API keys (for security)\n- Issues a new API key\n- Rotates the recovery code (old code is invalidated)\n\n**Important:** Save both the new API key AND the new recovery code - they're only shown once!",
        "operationId": "wallet_recover",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/WalletRecoverRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Account recovered successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_WalletRecoverResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request"
          },
          "401": {
            "description": "Invalid recovery code"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/wallet/recovery": {
      "post": {
        "tags": [
          "agent-wallet"
        ],
        "summary": "Set up account recovery (recovery code and/or email).",
        "description": "- If you don't have a `recovery_code` yet, this endpoint generates one and returns it **once**.\n- If you already have a `recovery_code`, it will not be shown again.\n- You can optionally set/update a recovery `email` for human account recovery.\n\nUse the recovery code with `POST /wallet/recover` to rotate access after losing your API key.",
        "operationId": "set_recovery",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SetRecoveryRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Recovery set up",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_RecoveryResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/wallet/referral": {
      "get": {
        "tags": [
          "agent-wallet"
        ],
        "summary": "Get user's referral info and code",
        "operationId": "get_referral_info",
        "responses": {
          "200": {
            "description": "Referral info retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_ReferralInfoResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/wallet/referral/apply": {
      "post": {
        "tags": [
          "agent-wallet"
        ],
        "summary": "Apply a referral code to the current user",
        "operationId": "apply_referral_code",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ApplyReferralRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Referral code applied"
          },
          "400": {
            "description": "Invalid referral code"
          },
          "401": {
            "description": "Unauthorized"
          },
          "409": {
            "description": "Already has a referrer"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/wallet/transactions": {
      "get": {
        "tags": [
          "agent-wallet"
        ],
        "summary": "Get transaction history including credits and debits",
        "operationId": "get_transactions",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "description": "Maximum number of transactions to return (default 50, max 100)",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "offset",
            "in": "query",
            "description": "Offset for pagination",
            "required": false,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          },
          {
            "name": "include_usage",
            "in": "query",
            "description": "Include raw usage/micropayment debits (default false).\nWhen false, usage debits are aggregated by day and publisher.",
            "required": false,
            "schema": {
              "type": "boolean"
            }
          },
          {
            "name": "start_date",
            "in": "query",
            "description": "Filter: only transactions on or after this date (YYYY-MM-DD, interpreted as UTC midnight)",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "description": "Filter: only transactions strictly before this date (YYYY-MM-DD, interpreted as UTC midnight).\nTo include a full day, set end_date to the day *after* the last day you want.",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Transaction history retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_WalletTransactionHistoryResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/wallet/transactions/export": {
      "get": {
        "tags": [
          "agent-wallet"
        ],
        "summary": "Export transactions as a CSV file for a date range",
        "operationId": "export_transactions",
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "description": "Start date (YYYY-MM-DD, inclusive, UTC midnight)",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "description": "End date (YYYY-MM-DD, exclusive, UTC midnight)",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "CSV file download",
            "content": {
              "text/csv": {}
            }
          },
          "401": {
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/wallet/transactions/summary": {
      "get": {
        "tags": [
          "agent-wallet"
        ],
        "summary": "Get summary statistics for transactions in a date range",
        "operationId": "get_transaction_summary",
        "parameters": [
          {
            "name": "start_date",
            "in": "query",
            "description": "Start date (YYYY-MM-DD, inclusive, UTC midnight)",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "description": "End date (YYYY-MM-DD, exclusive, UTC midnight)",
            "required": false,
            "schema": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Transaction summary retrieved",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_TransactionSummaryResponse"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/webhooks/event-types": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "List available event types",
        "operationId": "list_event_types",
        "responses": {
          "200": {
            "description": "Event types retrieved successfully",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DataResponse_Vec_String"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized"
          }
        },
        "security": [
          {
            "bearer_auth": []
          }
        ]
      }
    },
    "/webhooks/stripe": {
      "post": {
        "tags": [
          "webhooks"
        ],
        "summary": "POST /webhooks/stripe\nHandle Stripe webhook events",
        "operationId": "handle_stripe_webhook",
        "responses": {
          "200": {
            "description": "Webhook processed"
          },
          "400": {
            "description": "Invalid webhook signature"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AddPaymentMethodRequest": {
        "type": "object",
        "required": [
          "stripe_payment_method_id",
          "set_as_default"
        ],
        "properties": {
          "set_as_default": {
            "type": "boolean"
          },
          "stripe_payment_method_id": {
            "type": "string"
          }
        }
      },
      "AgentCreditSource": {
        "type": "string",
        "description": "Source of an agent credit grant (fiat-only, no on-chain deposits)",
        "enum": [
          "fiat_purchase",
          "signup_bonus",
          "payment_method_bonus",
          "daily_claim",
          "referral_reward",
          "admin_grant",
          "promo_code",
          "tier_bonus",
          "refund",
          "publisher_payout"
        ]
      },
      "AgentInfo": {
        "type": "object",
        "description": "Agent information returned on successful registration",
        "required": [
          "id",
          "name",
          "api_key",
          "organization_id",
          "status",
          "user_type",
          "created_at"
        ],
        "properties": {
          "api_key": {
            "type": "string",
            "description": "The full API key (seren_<key_id>_<secret>) - shown ONCE, save it immediately!"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When the account was created"
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "The agent's unique ID"
          },
          "name": {
            "type": "string",
            "description": "The agent's display name (auto-generated celestial name like \"radiant-sirius-a1b2\")"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid",
            "description": "The organization ID for API calls"
          },
          "status": {
            "type": "string",
            "description": "Account status (always \"active\" for new agents)"
          },
          "user_type": {
            "type": "string",
            "description": "Agent type (always \"agent\")"
          }
        }
      },
      "AgentRegisterRequest": {
        "type": "object",
        "description": "Request to register a new AI agent account.\nAll fields are optional - an empty body is valid.",
        "properties": {
          "name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional custom display name for the agent.\nIf not provided, a unique celestial-themed name will be generated (e.g., \"radiant-sirius\")."
          }
        }
      },
      "AgentRegisterResponse": {
        "type": "object",
        "description": "Response from agent registration endpoint",
        "required": [
          "success",
          "message",
          "agent",
          "setup",
          "skill_files"
        ],
        "properties": {
          "agent": {
            "$ref": "#/components/schemas/AgentInfo",
            "description": "The newly created agent account"
          },
          "message": {
            "type": "string",
            "description": "Welcome message"
          },
          "setup": {
            "$ref": "#/components/schemas/SetupInstructions",
            "description": "Setup instructions for getting started"
          },
          "skill_files": {
            "$ref": "#/components/schemas/SkillFiles",
            "description": "Links to skill files and documentation"
          },
          "success": {
            "type": "boolean",
            "description": "Whether registration was successful"
          }
        }
      },
      "AgentTask": {
        "type": "object",
        "description": "An agent task — tracks a single agent invocation lifecycle.",
        "required": [
          "id",
          "organization_id",
          "publisher_id",
          "user_id",
          "status",
          "trigger_type",
          "input_message",
          "cost_compute_atomic",
          "cost_tool_atomic",
          "cost_llm_atomic",
          "cost_total_atomic",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "a2a_context_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "a2a_task_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "completed_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "cost_cap_atomic": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "cost_compute_atomic": {
            "type": "integer",
            "format": "int64"
          },
          "cost_llm_atomic": {
            "type": "integer",
            "format": "int64"
          },
          "cost_tool_atomic": {
            "type": "integer",
            "format": "int64"
          },
          "cost_total_atomic": {
            "type": "integer",
            "format": "int64"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "error_message": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "input_message": {},
          "metadata": {},
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "output": {},
          "payment_request_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "publisher_id": {
            "type": "string",
            "format": "uuid"
          },
          "started_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "status": {
            "$ref": "#/components/schemas/AgentTaskStatus"
          },
          "trigger_type": {
            "$ref": "#/components/schemas/AgentTriggerType"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "AgentTaskEvent": {
        "type": "object",
        "description": "An event in the agent task lifecycle (for SSE streaming).",
        "required": [
          "id",
          "task_id",
          "event_type",
          "payload",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "event_type": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "payload": {},
          "task_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "AgentTaskStatus": {
        "type": "string",
        "description": "Agent task execution status, mirroring A2A TaskState with Seren additions.",
        "enum": [
          "pending",
          "submitted",
          "working",
          "input_required",
          "completed",
          "failed",
          "canceled"
        ]
      },
      "AgentTemplateSummary": {
        "type": "object",
        "description": "Summary view of agent template for catalog listing",
        "required": [
          "id",
          "slug",
          "name",
          "language",
          "price_atomic",
          "is_verified",
          "total_invocations"
        ],
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "is_verified": {
            "type": "boolean"
          },
          "language": {
            "$ref": "#/components/schemas/TemplateLanguage"
          },
          "name": {
            "type": "string"
          },
          "price_atomic": {
            "type": "integer",
            "format": "int64"
          },
          "publisher_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "publisher_slug": {
            "type": [
              "string",
              "null"
            ]
          },
          "slug": {
            "type": "string"
          },
          "total_invocations": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "AgentTriggerType": {
        "type": "string",
        "description": "How the agent task was triggered.",
        "enum": [
          "manual",
          "api",
          "mcp",
          "cli",
          "desktop",
          "scheduled",
          "webhook"
        ]
      },
      "AgentUpdateRequest": {
        "type": "object",
        "description": "Request to update an agent's profile.",
        "required": [
          "email"
        ],
        "properties": {
          "email": {
            "type": "string",
            "description": "Email address to set and verify.\nA verification email will be sent to this address."
          }
        }
      },
      "ApiKeyCreated": {
        "type": "object",
        "description": "Response struct for API key creation (includes the full key ONCE)",
        "required": [
          "id",
          "key_id",
          "name",
          "api_key",
          "organization_id",
          "created_at"
        ],
        "properties": {
          "api_key": {
            "type": "string",
            "description": "The full API key (seren_<key_id>_<secret>) - shown ONCE."
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "key_id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "ApiKeyInfo": {
        "type": "object",
        "description": "Response struct for listing API keys (never includes the secret)",
        "required": [
          "id",
          "key_id",
          "name",
          "key_prefix",
          "organization_id",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "key_id": {
            "type": "string"
          },
          "key_prefix": {
            "type": "string"
          },
          "last_used_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "name": {
            "type": "string"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "revoked_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "ApplyReferralRequest": {
        "type": "object",
        "description": "Request to apply a referral code",
        "required": [
          "referral_code"
        ],
        "properties": {
          "referral_code": {
            "type": "string"
          }
        }
      },
      "AssetInfo": {
        "type": "object",
        "description": "Minimal asset info for API responses",
        "required": [
          "id",
          "symbol",
          "name",
          "decimals",
          "network_id",
          "network_name",
          "is_native",
          "is_stablecoin"
        ],
        "properties": {
          "contract_address": {
            "type": [
              "string",
              "null"
            ]
          },
          "decimals": {
            "type": "integer",
            "format": "int32"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "is_native": {
            "type": "boolean"
          },
          "is_stablecoin": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "network_id": {
            "type": "string"
          },
          "network_name": {
            "type": "string"
          },
          "symbol": {
            "type": "string"
          }
        }
      },
      "AssignRoleRequest": {
        "type": "object",
        "description": "Request to assign a role to a member",
        "properties": {
          "role_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Either role_id or role_name must be provided"
          },
          "role_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Name of the role (owner, admin, editor, viewer, or custom role name)"
          }
        }
      },
      "AuditLog": {
        "type": "object",
        "description": "Audit log entry from the database",
        "required": [
          "id",
          "created_at",
          "actor_type",
          "action",
          "resource_type",
          "status"
        ],
        "properties": {
          "action": {
            "type": "string"
          },
          "action_category": {
            "type": [
              "string",
              "null"
            ]
          },
          "actor_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "actor_type": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "error_message": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "ip_address": {
            "type": [
              "string",
              "null"
            ]
          },
          "metadata": {},
          "organization_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "request_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "resource_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "resource_type": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "user_agent": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "AuditLogList": {
        "type": "object",
        "description": "Response for listing audit logs",
        "required": [
          "data",
          "total",
          "limit",
          "offset"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AuditLog"
            }
          },
          "limit": {
            "type": "integer",
            "format": "int64"
          },
          "offset": {
            "type": "integer",
            "format": "int64"
          },
          "total": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "BillingHealth": {
        "type": "object",
        "description": "High-level billing health summary.",
        "required": [
          "daily_aggregation_ok",
          "has_recent_daily_run",
          "daily_aggregation_failures_total",
          "jobs"
        ],
        "properties": {
          "daily_aggregation_failures_total": {
            "type": "integer",
            "format": "int64",
            "description": "Total failures recorded for the daily aggregation job since process start.",
            "minimum": 0
          },
          "daily_aggregation_ok": {
            "type": "boolean",
            "description": "True when we have a recent daily aggregation run and no known failures."
          },
          "has_recent_daily_run": {
            "type": "boolean",
            "description": "True when the last daily aggregation was within the expected window (<= 30h old)."
          },
          "jobs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BillingJobHealth"
            },
            "description": "Failure counters per billing job since process start."
          },
          "last_daily_aggregation_run_utc": {
            "type": [
              "string",
              "null"
            ],
            "description": "Last time daily_aggregated_usage was written, in UTC (RFC3339)."
          }
        }
      },
      "BillingJobHealth": {
        "type": "object",
        "description": "Billing job health for a single background job.",
        "required": [
          "job",
          "failures_total"
        ],
        "properties": {
          "failures_total": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "job": {
            "type": "string"
          }
        }
      },
      "BonusClaimResponse": {
        "type": "object",
        "description": "Response for claiming bonuses",
        "required": [
          "success",
          "amount_atomic",
          "amount_usd",
          "bonus_type"
        ],
        "properties": {
          "amount_atomic": {
            "type": "integer",
            "format": "int64"
          },
          "amount_usd": {
            "type": "string"
          },
          "bonus_type": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        }
      },
      "ChangePlanRequest": {
        "type": "object",
        "description": "Request to upgrade/downgrade an organization's plan",
        "required": [
          "plan_id"
        ],
        "properties": {
          "plan_id": {
            "type": "string",
            "format": "uuid"
          },
          "stripe_payment_method_id": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/StripePaymentMethodId"
              }
            ]
          }
        }
      },
      "ComputeType": {
        "type": "string",
        "description": "Compute type - specific compute offering when publisher_category = Compute",
        "enum": [
          "template",
          "workflow",
          "function",
          "agent"
        ]
      },
      "ComputeUsageEventDebugRecord": {
        "type": "object",
        "description": "Debug view: compute_usage_events entry for an endpoint",
        "required": [
          "event_type",
          "event_time"
        ],
        "properties": {
          "event_time": {
            "type": "string"
          },
          "event_type": {
            "type": "string"
          }
        }
      },
      "ConnectionsResponse": {
        "type": "object",
        "required": [
          "connections"
        ],
        "properties": {
          "connections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UserOAuthConnectionResponse"
            }
          }
        }
      },
      "ConsumptionPeriodData": {
        "type": "object",
        "description": "ConsumptionPeriodData for API responses (simplified)",
        "required": [
          "period_id"
        ],
        "properties": {
          "active_time_seconds": {
            "type": "number",
            "format": "double"
          },
          "cloud_compute_cost_usd": {
            "type": "number",
            "format": "double"
          },
          "cloud_compute_time_seconds": {
            "type": "number",
            "format": "double"
          },
          "compute_time_seconds": {
            "type": "number",
            "format": "double"
          },
          "data_transfer_bytes": {
            "type": "integer",
            "format": "int64"
          },
          "period_id": {
            "type": "string"
          },
          "serendb_compute_time_seconds": {
            "type": "number",
            "format": "double"
          },
          "synthetic_storage_size_bytes": {
            "type": "integer",
            "format": "int64"
          },
          "written_data_bytes": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "ConsumptionSummary": {
        "type": "object",
        "description": "ConsumptionSummary represents aggregated usage for a period",
        "properties": {
          "active_time_seconds": {
            "type": "number",
            "format": "double"
          },
          "cloud_compute_cost_usd": {
            "type": "number",
            "format": "double"
          },
          "cloud_compute_time_seconds": {
            "type": "number",
            "format": "double"
          },
          "compute_time_seconds": {
            "type": "number",
            "format": "double"
          },
          "data_transfer_bytes": {
            "type": "integer",
            "format": "int64"
          },
          "serendb_compute_time_seconds": {
            "type": "number",
            "format": "double"
          },
          "synthetic_storage_size_bytes": {
            "type": "integer",
            "format": "int64"
          },
          "written_data_bytes": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "CostEstimate": {
        "type": "object",
        "description": "Cost estimate breakdown",
        "required": [
          "estimated_rows",
          "asset_symbol",
          "base_cost",
          "markup_multiplier",
          "min_charge",
          "total_cost",
          "total_cost_atomic"
        ],
        "properties": {
          "asset_symbol": {
            "type": "string",
            "description": "Asset symbol (e.g., USDC, USDT)"
          },
          "base_cost": {
            "type": "string",
            "description": "Base cost in asset units (as decimal string)"
          },
          "estimated_rows": {
            "type": "integer",
            "format": "int64",
            "description": "Estimated rows to be returned"
          },
          "markup_multiplier": {
            "type": "string",
            "description": "Markup multiplier"
          },
          "min_charge": {
            "type": "string",
            "description": "Minimum charge in asset units"
          },
          "total_cost": {
            "type": "string",
            "description": "Total cost in asset units (as decimal string)"
          },
          "total_cost_atomic": {
            "type": "integer",
            "format": "int64",
            "description": "Total cost in atomic units"
          }
        }
      },
      "CreateApiKeyRequest": {
        "type": "object",
        "description": "Request to create a new API key",
        "required": [
          "name"
        ],
        "properties": {
          "expires_in_days": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "name": {
            "type": "string"
          }
        }
      },
      "CreateChargeRequest": {
        "type": "object",
        "required": [
          "agent_wallet",
          "amount_atomic",
          "description"
        ],
        "properties": {
          "agent_wallet": {
            "type": "string"
          },
          "amount_atomic": {
            "type": "integer",
            "format": "int64"
          },
          "description": {
            "type": "string"
          },
          "idempotency_key": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        }
      },
      "CreateOAuthProviderRequest": {
        "type": "object",
        "description": "Request to create/update an OAuth provider (admin only)",
        "required": [
          "slug",
          "name",
          "authorization_url",
          "token_url",
          "client_id",
          "client_secret",
          "scopes"
        ],
        "properties": {
          "authorization_url": {
            "type": "string"
          },
          "client_id": {
            "type": "string"
          },
          "client_secret": {
            "type": "string",
            "description": "Client secret (will be encrypted)"
          },
          "custom_auth_params": {
            "description": "Custom provider-specific authorization URL parameters (e.g., {\"access_type\": \"offline\"} for Google)"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "logo_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "pkce_required": {
            "type": "boolean"
          },
          "revocation_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "slug": {
            "type": "string"
          },
          "token_endpoint_auth_method": {
            "$ref": "#/components/schemas/TokenEndpointAuthMethod"
          },
          "token_url": {
            "type": "string"
          },
          "userinfo_url": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "CreateOrganizationInviteRequest": {
        "type": "object",
        "description": "Request body for creating an organization invite.",
        "required": [
          "email"
        ],
        "properties": {
          "email": {
            "type": "string",
            "description": "Email address of the invitee."
          },
          "role": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional role for the invitee (defaults to member)."
          }
        }
      },
      "CreateOrganizationVpcEndpointRequest": {
        "type": "object",
        "required": [
          "region",
          "endpoint_id"
        ],
        "properties": {
          "endpoint_id": {
            "type": "string"
          },
          "label": {
            "type": [
              "string",
              "null"
            ]
          },
          "region": {
            "type": "string"
          }
        }
      },
      "CreatePayoutRequest": {
        "type": "object",
        "required": [
          "destination_wallet",
          "amount_atomic",
          "description"
        ],
        "properties": {
          "amount_atomic": {
            "type": "integer",
            "format": "int64"
          },
          "description": {
            "type": "string"
          },
          "destination_wallet": {
            "type": "string"
          },
          "idempotency_key": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          }
        }
      },
      "CreatePublisherPayoutRequest": {
        "type": "object",
        "description": "Request to create a publisher payout.",
        "required": [
          "asset_id"
        ],
        "properties": {
          "amount_atomic": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Amount to withdraw in atomic units (defaults to max available)"
          },
          "asset_id": {
            "type": "string",
            "format": "uuid",
            "description": "Asset to withdraw (must be an asset accepted by the publisher)"
          },
          "destination_wallet": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/WalletAddress",
                "description": "Destination wallet override (defaults to the publisher's configured wallet)"
              }
            ]
          }
        }
      },
      "CreatePublisherRequest": {
        "type": "object",
        "description": "Request to create a new publisher",
        "required": [
          "name",
          "slug",
          "wallet_address",
          "wallet_network_id",
          "publisher_category"
        ],
        "properties": {
          "a2a_endpoint_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "A2A endpoint base URL (required for compute_type = agent)"
          },
          "accepted_asset_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Asset IDs the publisher accepts for payment"
          },
          "allowed_passthrough_headers": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Whitelist of agent-provided headers allowed to pass through to upstream"
          },
          "api_headers": {
            "description": "Headers for API requests (will be encrypted)"
          },
          "api_key_header": {
            "type": [
              "string",
              "null"
            ],
            "description": "Header name to inject upstream_api_key into (e.g., \"Authorization\", \"X-API-Key\")"
          },
          "api_key_query_param": {
            "type": [
              "string",
              "null"
            ],
            "description": "Query parameter name to inject upstream_api_key into (e.g., \"api_key\")"
          },
          "api_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "External API URL (required for integration_type = api)"
          },
          "auth_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "Upstream auth mode (\"static\", \"jwt\", or \"oauth2_cc\") (default: static)"
          },
          "base_price_per_1000_rows": {
            "type": [
              "string",
              "null"
            ]
          },
          "billing_model": {
            "type": [
              "string",
              "null"
            ],
            "description": "Billing model (\"x402_per_request\", \"prepaid_credits\", \"x402_passthrough\", \"pay_per_use\")"
          },
          "branch_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "SerenDB branch ID (required for database_type = serendb)"
          },
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Publisher-declared capabilities for task matching"
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "compute_type": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ComputeType",
                "description": "Compute type when publisher_category = compute"
              }
            ]
          },
          "database_config": {
            "description": "Provider-specific configuration\nFor connection_string auth: { \"connection_string\": \"postgresql://...\" }"
          },
          "database_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Database name within the SerenDB project (default: serendb)"
          },
          "database_type": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DatabaseType",
                "description": "Database type when publisher_category = database"
              }
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "Publisher contact email for notifications and support"
          },
          "endpoints": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/EndpointDefinition"
            },
            "description": "Structured endpoint definitions for LLM discoverability and access control"
          },
          "gateway_fee_percent": {
            "type": [
              "string",
              "null"
            ],
            "description": "Gateway fee percentage for upstream x402 payments (pass-through)."
          },
          "grace_period_minutes": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "hourly_rate": {
            "type": [
              "string",
              "null"
            ]
          },
          "integration_type": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/IntegrationType",
                "description": "Integration type when publisher_category = integration"
              }
            ]
          },
          "jwt_access_key": {
            "type": [
              "string",
              "null"
            ],
            "description": "JWT access key / issuer claim (plaintext)"
          },
          "jwt_algorithm": {
            "type": [
              "string",
              "null"
            ],
            "description": "JWT signing algorithm (\"HS256\", \"HS384\", \"HS512\") (default: HS256)"
          },
          "jwt_expiration_seconds": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "JWT expiration seconds (60-86400, default: 1800)"
          },
          "jwt_secret_key": {
            "type": [
              "string",
              "null"
            ],
            "description": "JWT secret key (will be encrypted)"
          },
          "logo_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional publisher branding URL"
          },
          "low_balance_threshold": {
            "type": [
              "string",
              "null"
            ]
          },
          "markup_multiplier": {
            "type": [
              "string",
              "null"
            ]
          },
          "mcp_endpoint": {
            "type": [
              "string",
              "null"
            ],
            "description": "MCP server endpoint URL (required for integration_type = mcp)"
          },
          "minimum_balance": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "oauth2_client_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "OAuth2 client ID for Client Credentials flow"
          },
          "oauth2_client_secret": {
            "type": [
              "string",
              "null"
            ],
            "description": "OAuth2 client secret for Client Credentials flow (will be encrypted)"
          },
          "oauth2_scopes": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "OAuth2 scopes to request during Client Credentials flow"
          },
          "oauth2_token_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "OAuth2 token endpoint URL for Client Credentials flow"
          },
          "oauth_provider_slug": {
            "type": [
              "string",
              "null"
            ],
            "description": "OAuth provider slug for BYOC (Bring Your Own Credentials) authentication.\nWhen set along with requires_user_oauth=true, users must connect their own\nOAuth account before using this publisher."
          },
          "ownership_tracking_enabled": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Enable resource ownership tracking (legacy gateway parity)"
          },
          "price_per_call": {
            "type": [
              "string",
              "null"
            ]
          },
          "price_per_delete": {
            "type": [
              "string",
              "null"
            ]
          },
          "price_per_execution": {
            "type": [
              "string",
              "null"
            ],
            "description": "Price per execution for agent templates or usage-based billing"
          },
          "price_per_get": {
            "type": [
              "string",
              "null"
            ]
          },
          "price_per_patch": {
            "type": [
              "string",
              "null"
            ]
          },
          "price_per_post": {
            "type": [
              "string",
              "null"
            ]
          },
          "price_per_put": {
            "type": [
              "string",
              "null"
            ]
          },
          "project_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "SerenDB project ID (required for database_type = serendb)"
          },
          "protected_operations": {
            "description": "Protected operations configuration - legacy, use endpoints[].is_protected instead"
          },
          "publisher_category": {
            "$ref": "#/components/schemas/PublisherCategory",
            "description": "Publisher category: database, integration, or compute"
          },
          "publisher_type": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PublisherType"
              }
            ]
          },
          "request_content_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "Content-Type for upstream API requests (default: application/json)"
          },
          "requires_user_oauth": {
            "type": "boolean",
            "description": "If true, users must connect via OAuth before using this publisher (BYOC mode).\nRequires oauth_provider_slug to be set."
          },
          "reserve_max_charge": {
            "type": [
              "string",
              "null"
            ],
            "description": "Maximum amount to reserve up-front for pay_per_use pre-authorization."
          },
          "resource_description": {
            "type": [
              "string",
              "null"
            ]
          },
          "resource_id_response_path": {
            "type": [
              "string",
              "null"
            ],
            "description": "JSONPath to resource ID in response body (for ownership tracking)"
          },
          "resource_id_url_pattern": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL pattern with :resourceId placeholder (for ownership tracking)"
          },
          "resource_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "routing": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/GeoRoutingConfig",
                "description": "Geographic routing configuration for geo-restricted upstream APIs"
              }
            ]
          },
          "slug": {
            "type": "string"
          },
          "token_cache_ttl_seconds": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "TTL for cached exchanged tokens in seconds (60-86400, default: 3600)"
          },
          "token_exchange_method": {
            "type": [
              "string",
              "null"
            ],
            "description": "HTTP method for exchange endpoint (POST or GET, default: POST)"
          },
          "token_exchange_mode": {
            "type": [
              "string",
              "null"
            ],
            "description": "How to send Seren token: header, body, or query (default: header)"
          },
          "token_exchange_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL to call for exchanging Seren API keys for publisher auth tokens"
          },
          "token_response_field": {
            "type": [
              "string",
              "null"
            ],
            "description": "JSON field in exchange response containing the token (default: access_token)"
          },
          "undocumented_endpoint_policy": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/UndocumentedEndpointPolicy",
                "description": "Policy for handling requests to paths not in the endpoints catalog (\"allow\" or \"block\")"
              }
            ]
          },
          "unresolved_fallback_charge": {
            "type": [
              "string",
              "null"
            ],
            "description": "Fallback charge used when pay_per_use cost cannot be resolved from upstream response or token estimates."
          },
          "upstream_api_key": {
            "type": [
              "string",
              "null"
            ],
            "description": "Upstream static API key (will be encrypted)"
          },
          "upstream_cost_response_path": {
            "type": [
              "string",
              "null"
            ],
            "description": "Dot-separated path to upstream cost in response body (for pay_per_use and prepaid passthrough billing).\nExample: \"usage.cost\""
          },
          "upstream_headers": {
            "description": "Non-sensitive headers to send to upstream API (e.g., User-Agent)"
          },
          "usage_examples": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/UsageExample"
            },
            "description": "Usage examples showing how to call the publisher's API"
          },
          "use_cases": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Human-readable use case descriptions"
          },
          "wallet_address": {
            "$ref": "#/components/schemas/WalletAddress",
            "description": "Wallet address for receiving payments"
          },
          "wallet_network_id": {
            "type": "string",
            "description": "Network ID for wallet (CAIP-2 format, e.g., \"eip155:8453\" for Base)"
          }
        }
      },
      "CreateRoleRequest": {
        "type": "object",
        "description": "Request to create a custom role",
        "required": [
          "name",
          "permissions"
        ],
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "CreateTemplateRequest": {
        "type": "object",
        "description": "Request to create/publish an agent template",
        "required": [
          "slug",
          "name",
          "code",
          "language",
          "price"
        ],
        "properties": {
          "code": {
            "type": "string",
            "description": "Template source code implementing run(input) -> output"
          },
          "computeBackend": {
            "type": [
              "string",
              "null"
            ],
            "description": "Preferred compute backend (e.g., \"daytona\", \"modal\"). If not specified, uses default."
          },
          "dependencies": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Package dependencies (e.g., [\"requests\", \"openai\"])"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Description of what the template does"
          },
          "language": {
            "$ref": "#/components/schemas/TemplateLanguage",
            "description": "Programming language (python, typescript, javascript)"
          },
          "llmConfig": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/LlmConfig",
                "description": "Optional LLM configuration"
              }
            ]
          },
          "name": {
            "type": "string",
            "description": "Display name"
          },
          "price": {
            "type": "string",
            "description": "Price per invocation (e.g., \"0.05\" for $0.05)"
          },
          "settingsSchema": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/TemplateSetting"
            },
            "description": "Publisher-defined user-configurable settings schema"
          },
          "slug": {
            "type": "string",
            "description": "URL-friendly slug (unique identifier)"
          }
        }
      },
      "CreateTemplateResponse": {
        "type": "object",
        "description": "Response after creating a template",
        "required": [
          "id",
          "slug",
          "name",
          "language",
          "priceAtomic",
          "isVerified",
          "createdAt"
        ],
        "properties": {
          "createdAt": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "isVerified": {
            "type": "boolean"
          },
          "language": {
            "$ref": "#/components/schemas/TemplateLanguage"
          },
          "name": {
            "type": "string"
          },
          "priceAtomic": {
            "type": "integer",
            "format": "int64"
          },
          "slug": {
            "type": "string"
          }
        }
      },
      "CreateWebhookRequest": {
        "type": "object",
        "description": "Request to create a webhook",
        "required": [
          "name",
          "url",
          "events"
        ],
        "properties": {
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "name": {
            "type": "string"
          },
          "project_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "url": {
            "type": "string"
          }
        }
      },
      "CurrencyCode": {
        "type": "string",
        "description": "A validated currency code.\n\nSupports:\n- ISO 4217 fiat currencies (USD, EUR, GBP, etc.)\n- Common crypto currencies (USDC, SOL, ETH, etc.)\n\n# Examples\n\n```\nuse seren_core::models::CurrencyCode;\n\nlet usd = CurrencyCode::new(\"USD\").unwrap();\nlet usdc = CurrencyCode::new(\"USDC\").unwrap();\nassert!(CurrencyCode::new(\"invalid\").is_err());\n```",
        "example": "USD"
      },
      "DailyClaimEligibilityResponse": {
        "type": "object",
        "description": "Response for daily claim eligibility check",
        "required": [
          "can_claim",
          "claims_remaining_this_month"
        ],
        "properties": {
          "can_claim": {
            "type": "boolean"
          },
          "claim_amount_usd": {
            "type": [
              "string",
              "null"
            ],
            "description": "Formatted USD amount that will be granted on a successful daily claim.\nOptional to avoid breaking older clients."
          },
          "claims_remaining_this_month": {
            "type": "integer",
            "format": "int32"
          },
          "reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "resets_in_seconds": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Seconds until the daily claim resets (midnight UTC).\nOnly present when can_claim is false due to already claiming today."
          }
        }
      },
      "DailyClaimResponse": {
        "type": "object",
        "description": "Response for claiming daily credits",
        "required": [
          "success",
          "amount_atomic",
          "amount_usd",
          "balance_atomic",
          "balance_usd",
          "claims_remaining_this_month"
        ],
        "properties": {
          "amount_atomic": {
            "type": "integer",
            "format": "int64"
          },
          "amount_usd": {
            "type": "string"
          },
          "balance_atomic": {
            "type": "integer",
            "format": "int64"
          },
          "balance_usd": {
            "type": "string"
          },
          "claims_remaining_this_month": {
            "type": "integer",
            "format": "int32"
          },
          "success": {
            "type": "boolean"
          }
        }
      },
      "DataResponse_AgentRegisterResponse": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Response from agent registration endpoint",
            "required": [
              "success",
              "message",
              "agent",
              "setup",
              "skill_files"
            ],
            "properties": {
              "agent": {
                "$ref": "#/components/schemas/AgentInfo",
                "description": "The newly created agent account"
              },
              "message": {
                "type": "string",
                "description": "Welcome message"
              },
              "setup": {
                "$ref": "#/components/schemas/SetupInstructions",
                "description": "Setup instructions for getting started"
              },
              "skill_files": {
                "$ref": "#/components/schemas/SkillFiles",
                "description": "Links to skill files and documentation"
              },
              "success": {
                "type": "boolean",
                "description": "Whether registration was successful"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_AgentTask": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "An agent task — tracks a single agent invocation lifecycle.",
            "required": [
              "id",
              "organization_id",
              "publisher_id",
              "user_id",
              "status",
              "trigger_type",
              "input_message",
              "cost_compute_atomic",
              "cost_tool_atomic",
              "cost_llm_atomic",
              "cost_total_atomic",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "a2a_context_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "a2a_task_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "completed_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "cost_cap_atomic": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int64"
              },
              "cost_compute_atomic": {
                "type": "integer",
                "format": "int64"
              },
              "cost_llm_atomic": {
                "type": "integer",
                "format": "int64"
              },
              "cost_tool_atomic": {
                "type": "integer",
                "format": "int64"
              },
              "cost_total_atomic": {
                "type": "integer",
                "format": "int64"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "error_message": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "input_message": {},
              "metadata": {},
              "organization_id": {
                "type": "string",
                "format": "uuid"
              },
              "output": {},
              "payment_request_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "publisher_id": {
                "type": "string",
                "format": "uuid"
              },
              "started_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "status": {
                "$ref": "#/components/schemas/AgentTaskStatus"
              },
              "trigger_type": {
                "$ref": "#/components/schemas/AgentTriggerType"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "user_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_ApiKeyCreated": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Response struct for API key creation (includes the full key ONCE)",
            "required": [
              "id",
              "key_id",
              "name",
              "api_key",
              "organization_id",
              "created_at"
            ],
            "properties": {
              "api_key": {
                "type": "string",
                "description": "The full API key (seren_<key_id>_<secret>) - shown ONCE."
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "expires_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "key_id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              },
              "organization_id": {
                "type": "string",
                "format": "uuid"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_AuditLog": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Audit log entry from the database",
            "required": [
              "id",
              "created_at",
              "actor_type",
              "action",
              "resource_type",
              "status"
            ],
            "properties": {
              "action": {
                "type": "string"
              },
              "action_category": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "actor_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "actor_type": {
                "type": "string"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "error_message": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "ip_address": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "metadata": {},
              "organization_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "request_id": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "resource_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "resource_type": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "user_agent": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_AuditLogList": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Response for listing audit logs",
            "required": [
              "data",
              "total",
              "limit",
              "offset"
            ],
            "properties": {
              "data": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/AuditLog"
                }
              },
              "limit": {
                "type": "integer",
                "format": "int64"
              },
              "offset": {
                "type": "integer",
                "format": "int64"
              },
              "total": {
                "type": "integer",
                "format": "int64"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_BillingHealth": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "High-level billing health summary.",
            "required": [
              "daily_aggregation_ok",
              "has_recent_daily_run",
              "daily_aggregation_failures_total",
              "jobs"
            ],
            "properties": {
              "daily_aggregation_failures_total": {
                "type": "integer",
                "format": "int64",
                "description": "Total failures recorded for the daily aggregation job since process start.",
                "minimum": 0
              },
              "daily_aggregation_ok": {
                "type": "boolean",
                "description": "True when we have a recent daily aggregation run and no known failures."
              },
              "has_recent_daily_run": {
                "type": "boolean",
                "description": "True when the last daily aggregation was within the expected window (<= 30h old)."
              },
              "jobs": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/BillingJobHealth"
                },
                "description": "Failure counters per billing job since process start."
              },
              "last_daily_aggregation_run_utc": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Last time daily_aggregated_usage was written, in UTC (RFC3339)."
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_BonusClaimResponse": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Response for claiming bonuses",
            "required": [
              "success",
              "amount_atomic",
              "amount_usd",
              "bonus_type"
            ],
            "properties": {
              "amount_atomic": {
                "type": "integer",
                "format": "int64"
              },
              "amount_usd": {
                "type": "string"
              },
              "bonus_type": {
                "type": "string"
              },
              "success": {
                "type": "boolean"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_CreateTemplateResponse": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Response after creating a template",
            "required": [
              "id",
              "slug",
              "name",
              "language",
              "priceAtomic",
              "isVerified",
              "createdAt"
            ],
            "properties": {
              "createdAt": {
                "type": "string",
                "format": "date-time"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "isVerified": {
                "type": "boolean"
              },
              "language": {
                "$ref": "#/components/schemas/TemplateLanguage"
              },
              "name": {
                "type": "string"
              },
              "priceAtomic": {
                "type": "integer",
                "format": "int64"
              },
              "slug": {
                "type": "string"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_DailyClaimEligibilityResponse": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Response for daily claim eligibility check",
            "required": [
              "can_claim",
              "claims_remaining_this_month"
            ],
            "properties": {
              "can_claim": {
                "type": "boolean"
              },
              "claim_amount_usd": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Formatted USD amount that will be granted on a successful daily claim.\nOptional to avoid breaking older clients."
              },
              "claims_remaining_this_month": {
                "type": "integer",
                "format": "int32"
              },
              "reason": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "resets_in_seconds": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int64",
                "description": "Seconds until the daily claim resets (midnight UTC).\nOnly present when can_claim is false due to already claiming today."
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_DailyClaimResponse": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Response for claiming daily credits",
            "required": [
              "success",
              "amount_atomic",
              "amount_usd",
              "balance_atomic",
              "balance_usd",
              "claims_remaining_this_month"
            ],
            "properties": {
              "amount_atomic": {
                "type": "integer",
                "format": "int64"
              },
              "amount_usd": {
                "type": "string"
              },
              "balance_atomic": {
                "type": "integer",
                "format": "int64"
              },
              "balance_usd": {
                "type": "string"
              },
              "claims_remaining_this_month": {
                "type": "integer",
                "format": "int32"
              },
              "success": {
                "type": "boolean"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_DepositResponse": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Response for wallet deposit initiation",
            "required": [
              "deposit_id",
              "checkout_url",
              "amount_atomic",
              "bonus_atomic",
              "total_atomic",
              "amount_usd",
              "bonus_usd",
              "total_usd"
            ],
            "properties": {
              "amount_atomic": {
                "type": "integer",
                "format": "int64",
                "description": "Base deposit amount in atomic units"
              },
              "amount_usd": {
                "type": "string"
              },
              "bonus_atomic": {
                "type": "integer",
                "format": "int64",
                "description": "Tier bonus in atomic units (if applicable)"
              },
              "bonus_usd": {
                "type": "string"
              },
              "checkout_url": {
                "type": "string",
                "description": "URL to the Stripe hosted checkout page - open this in a browser to complete payment"
              },
              "deposit_id": {
                "type": "string",
                "format": "uuid"
              },
              "total_atomic": {
                "type": "integer",
                "format": "int64",
                "description": "Total to be credited in atomic units"
              },
              "total_usd": {
                "type": "string"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_EndpointBillingEvents": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Combined debug response for an endpoint's billing events",
            "required": [
              "organization_id",
              "endpoint_id",
              "usage_events",
              "compute_usage_events"
            ],
            "properties": {
              "compute_usage_events": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ComputeUsageEventDebugRecord"
                }
              },
              "endpoint_id": {
                "type": "string"
              },
              "organization_id": {
                "type": "string"
              },
              "usage_events": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/UsageEventDebugRecord"
                }
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_EvalMatrixResponse": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "matrix",
              "generated_at",
              "total_signals"
            ],
            "properties": {
              "generated_at": {
                "type": "string",
                "format": "date-time"
              },
              "matrix": {
                "type": "object",
                "additionalProperties": {
                  "type": "object",
                  "additionalProperties": {
                    "$ref": "#/components/schemas/EvalMatrixEntry"
                  },
                  "propertyNames": {
                    "type": "string"
                  }
                },
                "propertyNames": {
                  "type": "string"
                }
              },
              "total_signals": {
                "type": "integer",
                "format": "int64"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_EvalSignalResponse": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "accepted",
              "rejected"
            ],
            "properties": {
              "accepted": {
                "type": "integer",
                "format": "int64"
              },
              "rejected": {
                "type": "integer",
                "format": "int64"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_FederatedResourceResponse": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Response for a single federated resource",
            "required": [
              "id",
              "publisher_id",
              "resource_type",
              "external_id",
              "metadata",
              "status",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "expires_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "external_id": {
                "type": "string"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "metadata": {},
              "org_database_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "publisher_id": {
                "type": "string",
                "format": "uuid"
              },
              "resource_type": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_FederationHistoryStatsResponse": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Response for federation history aggregate statistics.",
            "required": [
              "total_events",
              "unique_resources",
              "unique_publishers",
              "by_operation",
              "by_type",
              "by_status"
            ],
            "properties": {
              "by_operation": {
                "type": "object",
                "additionalProperties": {
                  "type": "integer",
                  "format": "int64"
                },
                "propertyNames": {
                  "type": "string"
                }
              },
              "by_status": {
                "type": "object",
                "additionalProperties": {
                  "type": "integer",
                  "format": "int64"
                },
                "propertyNames": {
                  "type": "string"
                }
              },
              "by_type": {
                "type": "object",
                "additionalProperties": {
                  "type": "integer",
                  "format": "int64"
                },
                "propertyNames": {
                  "type": "string"
                }
              },
              "total_events": {
                "type": "integer",
                "format": "int64"
              },
              "unique_publishers": {
                "type": "integer",
                "format": "int64"
              },
              "unique_resources": {
                "type": "integer",
                "format": "int64"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_FederationStatsResponse": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Response for federation statistics",
            "required": [
              "total_active",
              "by_type",
              "by_status"
            ],
            "properties": {
              "by_status": {
                "type": "object",
                "additionalProperties": {
                  "type": "integer",
                  "format": "int64"
                },
                "propertyNames": {
                  "type": "string"
                }
              },
              "by_type": {
                "type": "object",
                "additionalProperties": {
                  "type": "integer",
                  "format": "int64"
                },
                "propertyNames": {
                  "type": "string"
                }
              },
              "total_active": {
                "type": "integer",
                "format": "int64"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_Invoice": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Invoice response with line items",
            "required": [
              "id",
              "organization_id",
              "invoice_number",
              "period_start",
              "period_end",
              "subtotal_usd",
              "tax_usd",
              "total_usd",
              "status",
              "line_items"
            ],
            "properties": {
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "invoice_number": {
                "type": "string"
              },
              "line_items": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/InvoiceLineItem"
                }
              },
              "organization_id": {
                "type": "string",
                "format": "uuid"
              },
              "period_end": {
                "type": "string"
              },
              "period_start": {
                "type": "string"
              },
              "status": {
                "type": "string"
              },
              "subtotal_usd": {
                "type": "string"
              },
              "tax_usd": {
                "type": "string"
              },
              "total_usd": {
                "type": "string"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_InvoicesGenerated": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Response for invoice generation",
            "required": [
              "invoice_ids",
              "count"
            ],
            "properties": {
              "count": {
                "type": "integer",
                "minimum": 0
              },
              "invoice_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_InvokeTemplateResponse": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Response from invoking a template",
            "required": [
              "result",
              "cost",
              "executionTimeMs",
              "invocationId"
            ],
            "properties": {
              "cost": {
                "$ref": "#/components/schemas/InvocationCostBreakdown",
                "description": "Cost breakdown"
              },
              "executionTimeMs": {
                "type": "integer",
                "format": "int32",
                "description": "Execution time in milliseconds"
              },
              "invocationId": {
                "type": "string",
                "format": "uuid",
                "description": "Invocation ID for tracking"
              },
              "result": {
                "description": "Output from template execution"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_LoginResult": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "access_token",
              "refresh_token",
              "expires_in",
              "user",
              "default_organization_id"
            ],
            "properties": {
              "access_token": {
                "type": "string"
              },
              "default_organization_id": {
                "type": "string",
                "format": "uuid",
                "description": "The user's default organization ID for API calls requiring an organization context.\nThis is typically the first organization the user joined (their personal org)."
              },
              "expires_in": {
                "type": "integer",
                "format": "int64"
              },
              "refresh_token": {
                "type": "string"
              },
              "user": {
                "$ref": "#/components/schemas/UserInfo"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_LogoUploadResponse": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Logo upload response",
            "required": [
              "message",
              "logo_url"
            ],
            "properties": {
              "logo_url": {
                "type": "string",
                "description": "URL to access the uploaded logo"
              },
              "message": {
                "type": "string",
                "description": "Message indicating success"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_OAuthProviderResponse": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Response type for OAuth provider (excludes sensitive fields like client_secret)",
            "required": [
              "id",
              "slug",
              "name",
              "authorization_url",
              "token_url",
              "client_id",
              "scopes",
              "pkce_required",
              "token_endpoint_auth_method",
              "is_active",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "authorization_url": {
                "type": "string"
              },
              "client_id": {
                "type": "string"
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "is_active": {
                "type": "boolean"
              },
              "logo_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "name": {
                "type": "string"
              },
              "organization_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "pkce_required": {
                "type": "boolean"
              },
              "revocation_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "scopes": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "slug": {
                "type": "string"
              },
              "token_endpoint_auth_method": {
                "type": "string"
              },
              "token_url": {
                "type": "string"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "userinfo_url": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_OrganizationConsumption": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "OrganizationConsumption wraps organization-wide consumption",
            "required": [
              "organization_id",
              "from",
              "to",
              "periods",
              "current_month"
            ],
            "properties": {
              "current_month": {
                "$ref": "#/components/schemas/ConsumptionSummary"
              },
              "from": {
                "type": "string",
                "format": "date-time"
              },
              "organization_id": {
                "type": "string",
                "format": "uuid"
              },
              "periods": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/ConsumptionPeriodData"
                }
              },
              "to": {
                "type": "string",
                "format": "date-time"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_OrganizationInvite": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Response type for organization invites (token is not exposed over the API).",
            "required": [
              "id",
              "organization_id",
              "email",
              "role",
              "invited_by",
              "expires_at",
              "created_at"
            ],
            "properties": {
              "accepted_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "created_at": {
                "type": "string"
              },
              "email": {
                "type": "string"
              },
              "expires_at": {
                "type": "string"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "invited_by": {
                "type": "string",
                "format": "uuid"
              },
              "organization_id": {
                "type": "string",
                "format": "uuid"
              },
              "revoked_at": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "role": {
                "type": "string"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_OrganizationPlanWithDetails": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Response type that includes both the plan and organization_plan details",
            "required": [
              "organization_plan",
              "plan"
            ],
            "properties": {
              "organization_plan": {
                "$ref": "#/components/schemas/OrganizationPlan"
              },
              "plan": {
                "$ref": "#/components/schemas/Plan"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_OrganizationVpcEndpoint": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "organization_id",
              "region",
              "endpoint_id",
              "state",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "endpoint_id": {
                "type": "string"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "label": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "organization_id": {
                "type": "string",
                "format": "uuid"
              },
              "region": {
                "type": "string"
              },
              "state": {
                "type": "string"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_PasswordReset": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "message"
            ],
            "properties": {
              "message": {
                "type": "string"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_PasswordResetSent": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "message"
            ],
            "properties": {
              "message": {
                "type": "string"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_PaymentHistory": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Payment history response",
            "required": [
              "payments"
            ],
            "properties": {
              "payments": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PaymentRecord"
                }
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_PaymentIntentCreated": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Response for creating a payment intent",
            "required": [
              "payment_intent_id",
              "client_secret",
              "amount_cents",
              "amount_usd",
              "currency"
            ],
            "properties": {
              "amount_cents": {
                "type": "integer",
                "format": "int64",
                "description": "Amount to be charged, in cents."
              },
              "amount_usd": {
                "type": "string",
                "description": "Amount to be charged, in USD."
              },
              "client_secret": {
                "type": "string"
              },
              "currency": {
                "$ref": "#/components/schemas/CurrencyCode"
              },
              "payment_intent_id": {
                "$ref": "#/components/schemas/StripePaymentIntentId"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_PaymentMethodAdded": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Response for adding a payment method",
            "required": [
              "id",
              "message"
            ],
            "properties": {
              "id": {
                "type": "string"
              },
              "message": {
                "type": "string"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_Plan": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Plan represents a subscription tier (Free, Launch, Scale)",
            "required": [
              "id",
              "name",
              "display_name",
              "price_monthly",
              "max_compute_units",
              "max_branches_per_project",
              "support_level",
              "ip_allowlist_enabled",
              "vpc_enabled",
              "sso_enabled",
              "audit_logs_enabled",
              "monitoring_enabled",
              "is_active",
              "sort_order",
              "created_at",
              "updated_at"
            ],
            "properties": {
              "audit_logs_enabled": {
                "type": "boolean"
              },
              "branch_price_per_hour": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "compute_hours_quota": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32"
              },
              "compute_price_per_cu_hour": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "data_transfer_gb_included": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32"
              },
              "data_transfer_price_per_gb": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "display_name": {
                "type": "string"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "ip_allowlist_enabled": {
                "type": "boolean"
              },
              "is_active": {
                "type": "boolean"
              },
              "max_branches_per_project": {
                "type": "integer",
                "format": "int32"
              },
              "max_compute_units": {
                "type": "integer",
                "format": "int32"
              },
              "max_databases_per_branch": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32"
              },
              "max_endpoints_per_branch": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32"
              },
              "max_projects": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32"
              },
              "monitoring_enabled": {
                "type": "boolean"
              },
              "monitoring_retention_days": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32"
              },
              "name": {
                "type": "string"
              },
              "pitr_price_per_gb_month": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "pitr_retention_hours": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32"
              },
              "price_monthly": {
                "type": "string"
              },
              "scale_to_zero_delay_seconds": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32"
              },
              "sla_uptime_percent": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "sort_order": {
                "type": "integer",
                "format": "int32"
              },
              "sso_enabled": {
                "type": "boolean"
              },
              "storage_gb_quota": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "storage_price_per_gb_month": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "stripe_price_id": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Stripe Price ID used for recurring subscriptions on this plan (for paid tiers)."
              },
              "support_level": {
                "type": "string"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "vpc_enabled": {
                "type": "boolean"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_PricingConfigResponse": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Pricing config response",
            "required": [
              "asset_id",
              "pricing_model",
              "base_price_per_1000_rows",
              "markup_multiplier",
              "min_charge",
              "payment_expiry_minutes",
              "prepaid_enabled",
              "onchain_enabled",
              "minimum_balance",
              "low_balance_threshold"
            ],
            "properties": {
              "asset_id": {
                "type": "string",
                "format": "uuid",
                "description": "Asset this pricing applies to"
              },
              "asset_symbol": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Asset symbol for display"
              },
              "base_price_per_1000_rows": {
                "type": "string"
              },
              "grace_period_minutes": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32"
              },
              "hourly_rate": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "low_balance_threshold": {
                "type": "string"
              },
              "markup_multiplier": {
                "type": "string"
              },
              "max_queries_per_minute": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32"
              },
              "min_charge": {
                "type": "string"
              },
              "min_display_price": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Minimum price to display in UI for passthrough publishers (informational only)"
              },
              "minimum_balance": {
                "type": "string"
              },
              "onchain_enabled": {
                "type": "boolean"
              },
              "payment_expiry_minutes": {
                "type": "integer",
                "format": "int32"
              },
              "prepaid_enabled": {
                "type": "boolean"
              },
              "price_per_call": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "price_per_delete": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "price_per_execution": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Price per execution for agent templates or usage-based billing"
              },
              "price_per_get": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "price_per_patch": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "price_per_post": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "price_per_put": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "pricing_display_text": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Text to display for variable pricing (e.g., \"Varies by model\")"
              },
              "pricing_model": {
                "$ref": "#/components/schemas/PricingModel"
              },
              "reserve_max_charge": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "unresolved_fallback_charge": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_PublisherAgentBalance": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "serenbucks_atomic",
              "total_available_atomic"
            ],
            "properties": {
              "onchain_atomic": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int64"
              },
              "serenbucks_atomic": {
                "type": "integer",
                "format": "int64"
              },
              "total_available_atomic": {
                "type": "integer",
                "format": "int64"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_PublisherAnalytics": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Response for publisher analytics",
            "required": [
              "publisher_id",
              "templates",
              "totals"
            ],
            "properties": {
              "publisher_id": {
                "type": "string",
                "format": "uuid"
              },
              "templates": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/TemplateAnalytics"
                }
              },
              "totals": {
                "$ref": "#/components/schemas/PublisherAnalyticsTotals"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_PublisherChargeInfo": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "status",
              "amount_atomic",
              "agent_wallet"
            ],
            "properties": {
              "agent_wallet": {
                "type": "string"
              },
              "amount_atomic": {
                "type": "integer",
                "format": "int64"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "status": {
                "type": "string"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_PublisherPayoutInfo": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "id",
              "status",
              "amount_atomic",
              "destination_wallet"
            ],
            "properties": {
              "amount_atomic": {
                "type": "integer",
                "format": "int64"
              },
              "destination_wallet": {
                "type": "string"
              },
              "error_message": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "status": {
                "type": "string"
              },
              "tx_hash": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_PublisherPayoutResponse": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Publisher payout response.",
            "required": [
              "id",
              "publisher_id",
              "asset",
              "amount",
              "amount_atomic",
              "destination_wallet",
              "status",
              "requested_at"
            ],
            "properties": {
              "amount": {
                "type": "number",
                "format": "double"
              },
              "amount_atomic": {
                "type": "integer",
                "format": "int64"
              },
              "asset": {
                "$ref": "#/components/schemas/AssetInfo"
              },
              "destination_wallet": {
                "$ref": "#/components/schemas/WalletAddress"
              },
              "error_message": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "publisher_id": {
                "type": "string",
                "format": "uuid"
              },
              "requested_at": {
                "type": "string",
                "format": "date-time"
              },
              "status": {
                "$ref": "#/components/schemas/PayoutStatus"
              },
              "tx_hash": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_PublisherResponse": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Publisher response (excludes sensitive fields)",
            "required": [
              "id",
              "name",
              "slug",
              "categories",
              "capabilities",
              "use_cases",
              "publisher_type",
              "wallet_address",
              "wallet_network_id",
              "publisher_category",
              "billing_model",
              "gateway_fee_percent",
              "allowed_passthrough_headers",
              "request_content_type",
              "upstream_headers",
              "ownership_tracking_enabled",
              "undocumented_endpoint_policy",
              "is_active",
              "is_verified",
              "total_queries",
              "unique_agents_served",
              "total_revenue_atomic",
              "created_at",
              "updated_at",
              "requires_user_oauth"
            ],
            "properties": {
              "a2a_agent_card": {
                "description": "Cached A2A agent card"
              },
              "a2a_endpoint_url": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "A2A endpoint base URL (for compute_type = agent)"
              },
              "a2a_health_status": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "A2A health status: unknown, healthy, unhealthy, unreachable"
              },
              "accepted_assets": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "$ref": "#/components/schemas/AssetInfo"
                },
                "description": "Accepted assets for payment"
              },
              "allowed_passthrough_headers": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "api_key_header": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Header name to inject upstream_api_key into (e.g., \"Authorization\", \"X-API-Key\")"
              },
              "api_key_query_param": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Query parameter name to inject upstream_api_key into (e.g., \"api_key\", \"apiKey\")"
              },
              "api_url": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "External API URL (for integration_type = api)"
              },
              "billing_model": {
                "type": "string"
              },
              "branch_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "SerenDB branch ID (for database_type = serendb)"
              },
              "capabilities": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Publisher-declared capabilities for task matching"
              },
              "categories": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "compute_type": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/ComputeType",
                    "description": "Compute type when publisher_category = compute"
                  }
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "database_config": {
                "description": "Provider config (sensitive fields redacted)"
              },
              "database_name": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Database name within the SerenDB project"
              },
              "database_type": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/DatabaseType",
                    "description": "Database type when publisher_category = database"
                  }
                ]
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Publisher contact email for notifications and support"
              },
              "endpoints": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "$ref": "#/components/schemas/EndpointDefinition"
                },
                "description": "Structured endpoint definitions for LLM discoverability and access control"
              },
              "gateway_fee_percent": {
                "type": "string"
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "integration_type": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/IntegrationType",
                    "description": "Integration type when publisher_category = integration"
                  }
                ]
              },
              "is_active": {
                "type": "boolean"
              },
              "is_verified": {
                "type": "boolean"
              },
              "logo_url": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "mcp_capabilities": {
                "description": "Cached MCP capabilities (tools, resources, prompts)"
              },
              "mcp_endpoint": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "MCP server endpoint URL (for integration_type = mcp)"
              },
              "name": {
                "type": "string"
              },
              "oauth_provider_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "OAuth provider ID for BYOC (Bring Your Own Credentials) authentication"
              },
              "ownership_tracking_enabled": {
                "type": "boolean"
              },
              "pricing": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "$ref": "#/components/schemas/PricingConfigResponse"
                },
                "description": "Pricing config per asset (if included)"
              },
              "project_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "description": "SerenDB project ID (for database_type = serendb)"
              },
              "protected_operations": {},
              "publisher_category": {
                "$ref": "#/components/schemas/PublisherCategory",
                "description": "Publisher category: database, integration, or compute"
              },
              "publisher_type": {
                "$ref": "#/components/schemas/PublisherType"
              },
              "request_content_type": {
                "type": "string",
                "description": "Content-Type for upstream API requests"
              },
              "requires_user_oauth": {
                "type": "boolean",
                "description": "If true, users must connect via OAuth before using this publisher"
              },
              "resource_description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "resource_id_response_path": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "resource_id_url_pattern": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "resource_name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "routing": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/GeoRoutingConfig",
                    "description": "Geographic routing configuration (if publisher has geo-restricted upstream API)"
                  }
                ]
              },
              "slug": {
                "type": "string"
              },
              "token_cache_ttl_seconds": {
                "type": [
                  "integer",
                  "null"
                ],
                "format": "int32",
                "description": "TTL for cached exchanged tokens in seconds"
              },
              "token_exchange_method": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "HTTP method for exchange endpoint (POST or GET)"
              },
              "token_exchange_mode": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "How to send Seren token: header, body, or query"
              },
              "token_exchange_url": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "URL to call for exchanging Seren API keys for publisher auth tokens"
              },
              "token_response_field": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "JSON field in exchange response containing the token"
              },
              "total_queries": {
                "type": "integer",
                "format": "int64"
              },
              "total_revenue_atomic": {
                "type": "integer",
                "format": "int64",
                "description": "Lifetime total revenue across all assets, in atomic units"
              },
              "undocumented_endpoint_policy": {
                "$ref": "#/components/schemas/UndocumentedEndpointPolicy",
                "description": "Policy for handling requests to paths not in the endpoints catalog"
              },
              "unique_agents_served": {
                "type": "integer",
                "format": "int64"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              },
              "upstream_cost_response_path": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Dot-separated path to upstream cost in response body (for pay_per_use and prepaid passthrough billing).\nExample: \"usage.cost\""
              },
              "upstream_headers": {
                "description": "Non-sensitive headers to send to upstream API"
              },
              "usage_examples": {
                "type": [
                  "array",
                  "null"
                ],
                "items": {
                  "$ref": "#/components/schemas/UsageExample"
                },
                "description": "Usage examples showing how to call the publisher's API"
              },
              "use_cases": {
                "type": "array",
                "items": {
                  "type": "string"
                },
                "description": "Human-readable use case descriptions"
              },
              "verification_expires_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time",
                "description": "When verification expires (NULL = no expiry)"
              },
              "wallet_address": {
                "$ref": "#/components/schemas/WalletAddress"
              },
              "wallet_network_id": {
                "type": "string",
                "description": "Network for the wallet address"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_QuotaUsage": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Quota usage summary for an organization",
            "required": [
              "organization_id",
              "plan",
              "current_storage_gb",
              "current_compute_hours",
              "current_serendb_compute_hours",
              "current_cloud_compute_hours",
              "current_projects",
              "current_branches",
              "is_over_storage_quota",
              "is_over_compute_quota",
              "is_over_projects_quota"
            ],
            "properties": {
              "compute_hours_usage_percent": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double"
              },
              "current_branches": {
                "type": "integer",
                "format": "int32"
              },
              "current_cloud_compute_hours": {
                "type": "number",
                "format": "double"
              },
              "current_compute_hours": {
                "type": "number",
                "format": "double"
              },
              "current_projects": {
                "type": "integer",
                "format": "int32"
              },
              "current_serendb_compute_hours": {
                "type": "number",
                "format": "double"
              },
              "current_storage_gb": {
                "type": "number",
                "format": "double"
              },
              "is_over_compute_quota": {
                "type": "boolean"
              },
              "is_over_projects_quota": {
                "type": "boolean"
              },
              "is_over_storage_quota": {
                "type": "boolean"
              },
              "organization_id": {
                "type": "string",
                "format": "uuid"
              },
              "plan": {
                "$ref": "#/components/schemas/Plan"
              },
              "projects_usage_percent": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double"
              },
              "storage_usage_percent": {
                "type": [
                  "number",
                  "null"
                ],
                "format": "double"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_RbacRole": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Response after creating or updating a role",
            "required": [
              "id",
              "name",
              "is_built_in",
              "permissions",
              "created_at"
            ],
            "properties": {
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "is_built_in": {
                "type": "boolean"
              },
              "name": {
                "type": "string"
              },
              "permissions": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_RecoveryResponse": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Response for recovery setup",
            "required": [
              "has_recovery",
              "has_recovery_email",
              "message"
            ],
            "properties": {
              "has_recovery": {
                "type": "boolean",
                "description": "Whether recovery is now set up"
              },
              "has_recovery_email": {
                "type": "boolean",
                "description": "Whether a recovery email is set"
              },
              "message": {
                "type": "string",
                "description": "Message about recovery status"
              },
              "recovery_code": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Recovery code (only shown once, save it securely!)\nThis is a 24-character code that can be used to recover your account."
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_ReferralInfoResponse": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Response for referral info",
            "required": [
              "referral_code",
              "referral_url",
              "total_referrals",
              "total_earnings_atomic",
              "total_earnings_usd",
              "pending_earnings_atomic",
              "pending_earnings_usd"
            ],
            "properties": {
              "pending_earnings_atomic": {
                "type": "integer",
                "format": "int64"
              },
              "pending_earnings_usd": {
                "type": "string"
              },
              "referral_code": {
                "type": "string"
              },
              "referral_url": {
                "type": "string"
              },
              "total_earnings_atomic": {
                "type": "integer",
                "format": "int64"
              },
              "total_earnings_usd": {
                "type": "string"
              },
              "total_referrals": {
                "type": "integer",
                "format": "int64"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_RevenueMetrics": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Revenue metrics with period-over-period comparison.",
            "required": [
              "total_revenue_atomic",
              "total_revenue",
              "active_agents",
              "total_queries",
              "avg_query_cost_atomic",
              "revenue_change_pct",
              "agents_change_pct",
              "queries_change_pct",
              "period_start",
              "period_end"
            ],
            "properties": {
              "active_agents": {
                "type": "integer",
                "format": "int64",
                "description": "Number of active agents in the period"
              },
              "agents_change_pct": {
                "type": "integer",
                "format": "int32",
                "description": "Agent count change from previous period (percentage)"
              },
              "avg_query_cost_atomic": {
                "type": "integer",
                "format": "int64",
                "description": "Average query cost (atomic units)"
              },
              "period_end": {
                "type": "string",
                "description": "Period end date (ISO 8601)"
              },
              "period_start": {
                "type": "string",
                "description": "Period start date (ISO 8601)"
              },
              "queries_change_pct": {
                "type": "integer",
                "format": "int32",
                "description": "Query count change from previous period (percentage)"
              },
              "revenue_change_pct": {
                "type": "integer",
                "format": "int32",
                "description": "Revenue change from previous period (percentage, e.g., 15 = +15%)"
              },
              "total_queries": {
                "type": "integer",
                "format": "int64",
                "description": "Total queries executed in the period"
              },
              "total_revenue": {
                "type": "string",
                "description": "Total revenue as decimal string"
              },
              "total_revenue_atomic": {
                "type": "integer",
                "format": "int64",
                "description": "Total revenue in the period (atomic units)"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_SessionsRevoked": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "message",
              "revoked_count"
            ],
            "properties": {
              "message": {
                "type": "string"
              },
              "revoked_count": {
                "type": "integer",
                "format": "int64",
                "minimum": 0
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_SuggestResponse": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Response for suggest endpoint\nReturns publisher and agent recommendations based on task/query matching",
            "required": [
              "publishers",
              "agents"
            ],
            "properties": {
              "agents": {
                "type": "array",
                "items": {},
                "description": "Matched agents sorted by relevance (agent templates coming soon)"
              },
              "publishers": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/PublisherSuggestion"
                },
                "description": "Matched publishers sorted by relevance"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_TransactionSummaryResponse": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Summary statistics for transactions in a date range",
            "required": [
              "starting_balance_atomic",
              "starting_balance_usd",
              "total_credits_atomic",
              "total_credits_usd",
              "total_debits_atomic",
              "total_debits_usd",
              "net_change_atomic",
              "net_change_usd",
              "ending_balance_atomic",
              "ending_balance_usd",
              "transaction_count"
            ],
            "properties": {
              "ending_balance_atomic": {
                "type": "integer",
                "format": "int64",
                "description": "Wallet balance at the end of the selected period"
              },
              "ending_balance_usd": {
                "type": "string"
              },
              "net_change_atomic": {
                "type": "integer",
                "format": "int64",
                "description": "Net change (credits - debits, can be negative)"
              },
              "net_change_usd": {
                "type": "string"
              },
              "period_end": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "period_start": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "starting_balance_atomic": {
                "type": "integer",
                "format": "int64",
                "description": "Wallet balance immediately before the period start"
              },
              "starting_balance_usd": {
                "type": "string"
              },
              "total_credits_atomic": {
                "type": "integer",
                "format": "int64",
                "description": "Total credits received in the period (positive)"
              },
              "total_credits_usd": {
                "type": "string"
              },
              "total_debits_atomic": {
                "type": "integer",
                "format": "int64",
                "description": "Total debits spent in the period (positive number representing absolute spend)"
              },
              "total_debits_usd": {
                "type": "string"
              },
              "transaction_count": {
                "type": "integer",
                "format": "int64",
                "description": "Total number of transactions in the period"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_UserMe": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "allOf": [
              {
                "$ref": "#/components/schemas/UserInfo"
              },
              {
                "type": "object",
                "required": [
                  "default_organization_id"
                ],
                "properties": {
                  "default_organization_id": {
                    "type": "string",
                    "format": "uuid",
                    "description": "The user's default organization ID for API calls requiring an organization context.\nThis is typically the first organization the user joined (their personal org)."
                  }
                }
              }
            ],
            "description": "Response for GET /auth/me - current user info with default organization"
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_Vec_AgentTask": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "An agent task — tracks a single agent invocation lifecycle.",
              "required": [
                "id",
                "organization_id",
                "publisher_id",
                "user_id",
                "status",
                "trigger_type",
                "input_message",
                "cost_compute_atomic",
                "cost_tool_atomic",
                "cost_llm_atomic",
                "cost_total_atomic",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "a2a_context_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "a2a_task_id": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "completed_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "cost_cap_atomic": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int64"
                },
                "cost_compute_atomic": {
                  "type": "integer",
                  "format": "int64"
                },
                "cost_llm_atomic": {
                  "type": "integer",
                  "format": "int64"
                },
                "cost_tool_atomic": {
                  "type": "integer",
                  "format": "int64"
                },
                "cost_total_atomic": {
                  "type": "integer",
                  "format": "int64"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "error_message": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "input_message": {},
                "metadata": {},
                "organization_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "output": {},
                "payment_request_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "publisher_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "started_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "status": {
                  "$ref": "#/components/schemas/AgentTaskStatus"
                },
                "trigger_type": {
                  "$ref": "#/components/schemas/AgentTriggerType"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "user_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_Vec_AgentTaskEvent": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "An event in the agent task lifecycle (for SSE streaming).",
              "required": [
                "id",
                "task_id",
                "event_type",
                "payload",
                "created_at"
              ],
              "properties": {
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "event_type": {
                  "type": "string"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "payload": {},
                "task_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_Vec_AgentTemplateSummary": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Summary view of agent template for catalog listing",
              "required": [
                "id",
                "slug",
                "name",
                "language",
                "price_atomic",
                "is_verified",
                "total_invocations"
              ],
              "properties": {
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "is_verified": {
                  "type": "boolean"
                },
                "language": {
                  "$ref": "#/components/schemas/TemplateLanguage"
                },
                "name": {
                  "type": "string"
                },
                "price_atomic": {
                  "type": "integer",
                  "format": "int64"
                },
                "publisher_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "publisher_slug": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "slug": {
                  "type": "string"
                },
                "total_invocations": {
                  "type": "integer",
                  "format": "int64"
                }
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_Vec_ApiKeyInfo": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Response struct for listing API keys (never includes the secret)",
              "required": [
                "id",
                "key_id",
                "name",
                "key_prefix",
                "organization_id",
                "created_at"
              ],
              "properties": {
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "expires_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "key_id": {
                  "type": "string"
                },
                "key_prefix": {
                  "type": "string"
                },
                "last_used_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "name": {
                  "type": "string"
                },
                "organization_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "revoked_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                }
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_Vec_DatabaseWithContext": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Database with full project and branch context for cross-project listing",
              "required": [
                "id",
                "name",
                "project_id",
                "project_name",
                "branch_id",
                "branch_name",
                "is_default_branch",
                "created_at"
              ],
              "properties": {
                "branch_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Branch ID"
                },
                "branch_name": {
                  "type": "string",
                  "description": "Human-readable branch name"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Database ID"
                },
                "is_default_branch": {
                  "type": "boolean",
                  "description": "Whether this is the project's default branch"
                },
                "name": {
                  "type": "string",
                  "description": "Database name"
                },
                "owner_name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Database owner role name"
                },
                "project_id": {
                  "type": "string",
                  "format": "uuid",
                  "description": "Project ID"
                },
                "project_name": {
                  "type": "string",
                  "description": "Human-readable project name"
                }
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_Vec_FederatedResourceHistoryResponse": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Response for a federation history event with optional publisher metadata.",
              "required": [
                "id",
                "publisher_id",
                "resource_type",
                "external_id",
                "metadata",
                "status",
                "operation",
                "changed_at"
              ],
              "properties": {
                "changed_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "expires_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "external_id": {
                  "type": "string"
                },
                "federation_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "metadata": {},
                "operation": {
                  "type": "string"
                },
                "org_database_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "publisher_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "publisher_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "publisher_slug": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "resource_type": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                }
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_Vec_FederatedResourceWithPublisherResponse": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Response for a federated resource with publisher info",
              "required": [
                "id",
                "publisher_id",
                "publisher_slug",
                "publisher_name",
                "resource_type",
                "external_id",
                "metadata",
                "status",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "expires_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "external_id": {
                  "type": "string"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "metadata": {},
                "org_database_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "publisher_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "publisher_name": {
                  "type": "string"
                },
                "publisher_slug": {
                  "type": "string"
                },
                "resource_type": {
                  "type": "string"
                },
                "status": {
                  "type": "string"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_Vec_OAuthProviderResponse": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Response type for OAuth provider (excludes sensitive fields like client_secret)",
              "required": [
                "id",
                "slug",
                "name",
                "authorization_url",
                "token_url",
                "client_id",
                "scopes",
                "pkce_required",
                "token_endpoint_auth_method",
                "is_active",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "authorization_url": {
                  "type": "string"
                },
                "client_id": {
                  "type": "string"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "is_active": {
                  "type": "boolean"
                },
                "logo_url": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "name": {
                  "type": "string"
                },
                "organization_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "pkce_required": {
                  "type": "boolean"
                },
                "revocation_url": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "scopes": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "slug": {
                  "type": "string"
                },
                "token_endpoint_auth_method": {
                  "type": "string"
                },
                "token_url": {
                  "type": "string"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "userinfo_url": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_Vec_Organization": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "name",
                "slug",
                "created_by",
                "is_personal",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "type": "string",
                  "format": "uuid"
                },
                "deleted_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "is_personal": {
                  "type": "boolean"
                },
                "name": {
                  "type": "string"
                },
                "slug": {
                  "$ref": "#/components/schemas/Slug"
                },
                "stripe_customer_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Stripe Customer ID for this organization (if billing is enabled)."
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_Vec_OrganizationInvite": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Response type for organization invites (token is not exposed over the API).",
              "required": [
                "id",
                "organization_id",
                "email",
                "role",
                "invited_by",
                "expires_at",
                "created_at"
              ],
              "properties": {
                "accepted_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "created_at": {
                  "type": "string"
                },
                "email": {
                  "type": "string"
                },
                "expires_at": {
                  "type": "string"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "invited_by": {
                  "type": "string",
                  "format": "uuid"
                },
                "organization_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "revoked_at": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "role": {
                  "type": "string"
                }
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_Vec_OrganizationMemberWithUser": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Organization member with denormalized user fields for API responses.",
              "required": [
                "id",
                "organization_id",
                "user_id",
                "email",
                "role",
                "created_at"
              ],
              "properties": {
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "email": {
                  "$ref": "#/components/schemas/Email"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "organization_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "role": {
                  "type": "string"
                },
                "user_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_Vec_OrganizationVpcEndpoint": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "id",
                "organization_id",
                "region",
                "endpoint_id",
                "state",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "endpoint_id": {
                  "type": "string"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "label": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "organization_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "region": {
                  "type": "string"
                },
                "state": {
                  "type": "string"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                }
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_Vec_PaymentMethod": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Payment method details",
              "required": [
                "id",
                "type_",
                "is_default"
              ],
              "properties": {
                "bank_last4": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "card_brand": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "card_exp_month": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32"
                },
                "card_exp_year": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32"
                },
                "card_last4": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "type": "string"
                },
                "is_default": {
                  "type": "boolean"
                },
                "type_": {
                  "type": "string"
                }
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_Vec_Permission": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Permission definition",
              "required": [
                "id",
                "name",
                "resource_type",
                "action",
                "created_at"
              ],
              "properties": {
                "action": {
                  "type": "string"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "resource_type": {
                  "type": "string"
                }
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_Vec_Plan": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Plan represents a subscription tier (Free, Launch, Scale)",
              "required": [
                "id",
                "name",
                "display_name",
                "price_monthly",
                "max_compute_units",
                "max_branches_per_project",
                "support_level",
                "ip_allowlist_enabled",
                "vpc_enabled",
                "sso_enabled",
                "audit_logs_enabled",
                "monitoring_enabled",
                "is_active",
                "sort_order",
                "created_at",
                "updated_at"
              ],
              "properties": {
                "audit_logs_enabled": {
                  "type": "boolean"
                },
                "branch_price_per_hour": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "compute_hours_quota": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32"
                },
                "compute_price_per_cu_hour": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "data_transfer_gb_included": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32"
                },
                "data_transfer_price_per_gb": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "display_name": {
                  "type": "string"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "ip_allowlist_enabled": {
                  "type": "boolean"
                },
                "is_active": {
                  "type": "boolean"
                },
                "max_branches_per_project": {
                  "type": "integer",
                  "format": "int32"
                },
                "max_compute_units": {
                  "type": "integer",
                  "format": "int32"
                },
                "max_databases_per_branch": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32"
                },
                "max_endpoints_per_branch": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32"
                },
                "max_projects": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32"
                },
                "monitoring_enabled": {
                  "type": "boolean"
                },
                "monitoring_retention_days": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32"
                },
                "name": {
                  "type": "string"
                },
                "pitr_price_per_gb_month": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "pitr_retention_hours": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32"
                },
                "price_monthly": {
                  "type": "string"
                },
                "scale_to_zero_delay_seconds": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32"
                },
                "sla_uptime_percent": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "sort_order": {
                  "type": "integer",
                  "format": "int32"
                },
                "sso_enabled": {
                  "type": "boolean"
                },
                "storage_gb_quota": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "storage_price_per_gb_month": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "stripe_price_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Stripe Price ID used for recurring subscriptions on this plan (for paid tiers)."
                },
                "support_level": {
                  "type": "string"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "vpc_enabled": {
                  "type": "boolean"
                }
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_Vec_PublisherEarningsResponse": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Publisher earnings summary response (per asset).",
              "required": [
                "publisher_id",
                "publisher_name",
                "publisher_slug",
                "wallet_address",
                "asset",
                "total_revenue",
                "total_withdrawn",
                "pending_payout",
                "available",
                "total_revenue_atomic",
                "total_withdrawn_atomic",
                "pending_payout_atomic",
                "available_atomic",
                "request_count"
              ],
              "properties": {
                "asset": {
                  "$ref": "#/components/schemas/AssetInfo"
                },
                "available": {
                  "type": "number",
                  "format": "double"
                },
                "available_atomic": {
                  "type": "integer",
                  "format": "int64"
                },
                "pending_payout": {
                  "type": "number",
                  "format": "double"
                },
                "pending_payout_atomic": {
                  "type": "integer",
                  "format": "int64"
                },
                "publisher_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "publisher_name": {
                  "type": "string"
                },
                "publisher_slug": {
                  "type": "string"
                },
                "request_count": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Count of billable transactions for this asset (query_charge, api_call, service_fee)."
                },
                "total_revenue": {
                  "type": "number",
                  "format": "double"
                },
                "total_revenue_atomic": {
                  "type": "integer",
                  "format": "int64"
                },
                "total_withdrawn": {
                  "type": "number",
                  "format": "double"
                },
                "total_withdrawn_atomic": {
                  "type": "integer",
                  "format": "int64"
                },
                "wallet_address": {
                  "$ref": "#/components/schemas/WalletAddress"
                }
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_Vec_PublisherPayoutResponse": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Publisher payout response.",
              "required": [
                "id",
                "publisher_id",
                "asset",
                "amount",
                "amount_atomic",
                "destination_wallet",
                "status",
                "requested_at"
              ],
              "properties": {
                "amount": {
                  "type": "number",
                  "format": "double"
                },
                "amount_atomic": {
                  "type": "integer",
                  "format": "int64"
                },
                "asset": {
                  "$ref": "#/components/schemas/AssetInfo"
                },
                "destination_wallet": {
                  "$ref": "#/components/schemas/WalletAddress"
                },
                "error_message": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "publisher_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "requested_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "status": {
                  "$ref": "#/components/schemas/PayoutStatus"
                },
                "tx_hash": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_Vec_PublisherResponse": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Publisher response (excludes sensitive fields)",
              "required": [
                "id",
                "name",
                "slug",
                "categories",
                "capabilities",
                "use_cases",
                "publisher_type",
                "wallet_address",
                "wallet_network_id",
                "publisher_category",
                "billing_model",
                "gateway_fee_percent",
                "allowed_passthrough_headers",
                "request_content_type",
                "upstream_headers",
                "ownership_tracking_enabled",
                "undocumented_endpoint_policy",
                "is_active",
                "is_verified",
                "total_queries",
                "unique_agents_served",
                "total_revenue_atomic",
                "created_at",
                "updated_at",
                "requires_user_oauth"
              ],
              "properties": {
                "a2a_agent_card": {
                  "description": "Cached A2A agent card"
                },
                "a2a_endpoint_url": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "A2A endpoint base URL (for compute_type = agent)"
                },
                "a2a_health_status": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "A2A health status: unknown, healthy, unhealthy, unreachable"
                },
                "accepted_assets": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "$ref": "#/components/schemas/AssetInfo"
                  },
                  "description": "Accepted assets for payment"
                },
                "allowed_passthrough_headers": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "api_key_header": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Header name to inject upstream_api_key into (e.g., \"Authorization\", \"X-API-Key\")"
                },
                "api_key_query_param": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Query parameter name to inject upstream_api_key into (e.g., \"api_key\", \"apiKey\")"
                },
                "api_url": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "External API URL (for integration_type = api)"
                },
                "billing_model": {
                  "type": "string"
                },
                "branch_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid",
                  "description": "SerenDB branch ID (for database_type = serendb)"
                },
                "capabilities": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Publisher-declared capabilities for task matching"
                },
                "categories": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "compute_type": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/ComputeType",
                      "description": "Compute type when publisher_category = compute"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "database_config": {
                  "description": "Provider config (sensitive fields redacted)"
                },
                "database_name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Database name within the SerenDB project"
                },
                "database_type": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/DatabaseType",
                      "description": "Database type when publisher_category = database"
                    }
                  ]
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "email": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Publisher contact email for notifications and support"
                },
                "endpoints": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "$ref": "#/components/schemas/EndpointDefinition"
                  },
                  "description": "Structured endpoint definitions for LLM discoverability and access control"
                },
                "gateway_fee_percent": {
                  "type": "string"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "integration_type": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/IntegrationType",
                      "description": "Integration type when publisher_category = integration"
                    }
                  ]
                },
                "is_active": {
                  "type": "boolean"
                },
                "is_verified": {
                  "type": "boolean"
                },
                "logo_url": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mcp_capabilities": {
                  "description": "Cached MCP capabilities (tools, resources, prompts)"
                },
                "mcp_endpoint": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "MCP server endpoint URL (for integration_type = mcp)"
                },
                "name": {
                  "type": "string"
                },
                "oauth_provider_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid",
                  "description": "OAuth provider ID for BYOC (Bring Your Own Credentials) authentication"
                },
                "ownership_tracking_enabled": {
                  "type": "boolean"
                },
                "pricing": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "$ref": "#/components/schemas/PricingConfigResponse"
                  },
                  "description": "Pricing config per asset (if included)"
                },
                "project_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid",
                  "description": "SerenDB project ID (for database_type = serendb)"
                },
                "protected_operations": {},
                "publisher_category": {
                  "$ref": "#/components/schemas/PublisherCategory",
                  "description": "Publisher category: database, integration, or compute"
                },
                "publisher_type": {
                  "$ref": "#/components/schemas/PublisherType"
                },
                "request_content_type": {
                  "type": "string",
                  "description": "Content-Type for upstream API requests"
                },
                "requires_user_oauth": {
                  "type": "boolean",
                  "description": "If true, users must connect via OAuth before using this publisher"
                },
                "resource_description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "resource_id_response_path": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "resource_id_url_pattern": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "resource_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "routing": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/GeoRoutingConfig",
                      "description": "Geographic routing configuration (if publisher has geo-restricted upstream API)"
                    }
                  ]
                },
                "slug": {
                  "type": "string"
                },
                "token_cache_ttl_seconds": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32",
                  "description": "TTL for cached exchanged tokens in seconds"
                },
                "token_exchange_method": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "HTTP method for exchange endpoint (POST or GET)"
                },
                "token_exchange_mode": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "How to send Seren token: header, body, or query"
                },
                "token_exchange_url": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "URL to call for exchanging Seren API keys for publisher auth tokens"
                },
                "token_response_field": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "JSON field in exchange response containing the token"
                },
                "total_queries": {
                  "type": "integer",
                  "format": "int64"
                },
                "total_revenue_atomic": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Lifetime total revenue across all assets, in atomic units"
                },
                "undocumented_endpoint_policy": {
                  "$ref": "#/components/schemas/UndocumentedEndpointPolicy",
                  "description": "Policy for handling requests to paths not in the endpoints catalog"
                },
                "unique_agents_served": {
                  "type": "integer",
                  "format": "int64"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "upstream_cost_response_path": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Dot-separated path to upstream cost in response body (for pay_per_use and prepaid passthrough billing).\nExample: \"usage.cost\""
                },
                "upstream_headers": {
                  "description": "Non-sensitive headers to send to upstream API"
                },
                "usage_examples": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "$ref": "#/components/schemas/UsageExample"
                  },
                  "description": "Usage examples showing how to call the publisher's API"
                },
                "use_cases": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Human-readable use case descriptions"
                },
                "verification_expires_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "When verification expires (NULL = no expiry)"
                },
                "wallet_address": {
                  "$ref": "#/components/schemas/WalletAddress"
                },
                "wallet_network_id": {
                  "type": "string",
                  "description": "Network for the wallet address"
                }
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_Vec_RbacRole": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Response after creating or updating a role",
              "required": [
                "id",
                "name",
                "is_built_in",
                "permissions",
                "created_at"
              ],
              "properties": {
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "is_built_in": {
                  "type": "boolean"
                },
                "name": {
                  "type": "string"
                },
                "permissions": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                }
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_Vec_RevenueByDay": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Revenue breakdown by day.",
              "required": [
                "date",
                "revenue_atomic",
                "revenue",
                "query_count",
                "unique_agents"
              ],
              "properties": {
                "date": {
                  "type": "string",
                  "description": "Date (YYYY-MM-DD)"
                },
                "query_count": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Number of queries on this day"
                },
                "revenue": {
                  "type": "string",
                  "description": "Revenue as decimal string"
                },
                "revenue_atomic": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Revenue on this day (atomic units)"
                },
                "unique_agents": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Number of unique agents on this day"
                }
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_Vec_Session": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Response for listing user sessions (hides sensitive token hash)",
              "required": [
                "id",
                "last_active_at",
                "created_at",
                "expires_at",
                "is_current"
              ],
              "properties": {
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "expires_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "ip_address": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "is_current": {
                  "type": "boolean"
                },
                "last_active_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "user_agent": {
                  "type": [
                    "string",
                    "null"
                  ]
                }
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_Vec_String": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_Vec_TopAgent": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Top agent by spending.",
              "required": [
                "rank",
                "agent_wallet",
                "total_spent_atomic",
                "total_spent",
                "balance_atomic",
                "query_count"
              ],
              "properties": {
                "agent_wallet": {
                  "type": "string",
                  "description": "Agent wallet address"
                },
                "balance_atomic": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Current balance (atomic units)"
                },
                "last_active": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Last activity timestamp (ISO 8601)"
                },
                "query_count": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Number of queries executed"
                },
                "rank": {
                  "type": "integer",
                  "format": "int32",
                  "description": "Rank (1 = highest spender)"
                },
                "total_spent": {
                  "type": "string",
                  "description": "Total amount spent as decimal string"
                },
                "total_spent_atomic": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Total amount spent (atomic units)"
                }
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_Vec_UsageSummary": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Usage summary for billing period",
              "required": [
                "organization_id",
                "project_id",
                "project_name",
                "project_region",
                "period_start",
                "period_end",
                "compute_hours_small",
                "compute_hours_medium",
                "compute_hours_large",
                "compute_hours_xlarge",
                "storage_gb_avg",
                "pitr_gb_avg",
                "compute_cost_usd",
                "storage_cost_usd",
                "total_cost_usd"
              ],
              "properties": {
                "compute_cost_usd": {
                  "type": "string"
                },
                "compute_hours_large": {
                  "type": "number",
                  "format": "double"
                },
                "compute_hours_medium": {
                  "type": "number",
                  "format": "double"
                },
                "compute_hours_small": {
                  "type": "number",
                  "format": "double"
                },
                "compute_hours_xlarge": {
                  "type": "number",
                  "format": "double"
                },
                "organization_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "period_end": {
                  "type": "string"
                },
                "period_start": {
                  "type": "string"
                },
                "pitr_gb_avg": {
                  "type": "number",
                  "format": "double"
                },
                "project_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "project_name": {
                  "type": "string",
                  "description": "Human-readable project name (denormalized for convenience)."
                },
                "project_region": {
                  "type": "string",
                  "description": "Cloud region for the project (e.g., aws-us-east-1)."
                },
                "storage_cost_usd": {
                  "type": "string"
                },
                "storage_gb_avg": {
                  "type": "number",
                  "format": "double"
                },
                "total_cost_usd": {
                  "type": "string"
                }
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_Vec_WebhookDelivery": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Webhook delivery record",
              "required": [
                "id",
                "webhook_id",
                "event_type",
                "event_id",
                "payload",
                "attempt_number",
                "created_at"
              ],
              "properties": {
                "attempt_number": {
                  "type": "integer",
                  "format": "int32"
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "delivered_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "error_message": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "event_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "event_type": {
                  "type": "string"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "next_retry_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time"
                },
                "payload": {
                  "type": "object"
                },
                "response_body": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "response_status": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32"
                },
                "webhook_id": {
                  "type": "string",
                  "format": "uuid"
                }
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_Vec_WebhookInfo": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Webhook response (hides secret)",
              "required": [
                "id",
                "organization_id",
                "name",
                "url",
                "events",
                "enabled",
                "created_by",
                "created_at"
              ],
              "properties": {
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "created_by": {
                  "type": "string",
                  "format": "uuid"
                },
                "enabled": {
                  "type": "boolean"
                },
                "events": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "name": {
                  "type": "string"
                },
                "organization_id": {
                  "type": "string",
                  "format": "uuid"
                },
                "project_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid"
                },
                "url": {
                  "type": "string"
                }
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_VerificationSent": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "required": [
              "message"
            ],
            "properties": {
              "message": {
                "type": "string"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_WalletBalanceResponse": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Wallet balance response (funded + promotional)",
            "required": [
              "wallet_address",
              "balance_atomic",
              "balance_usd",
              "funded_balance_atomic",
              "funded_balance_usd",
              "promotional_balance_atomic",
              "promotional_balance_usd",
              "by_source",
              "total_purchases_cents",
              "total_purchases_usd",
              "has_recovery"
            ],
            "properties": {
              "balance_atomic": {
                "type": "integer",
                "format": "int64",
                "description": "Total wallet balance in atomic units"
              },
              "balance_usd": {
                "type": "string"
              },
              "by_source": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/WalletSourceBalance"
                },
                "description": "Breakdown by source"
              },
              "funded_balance_atomic": {
                "type": "integer",
                "format": "int64",
                "description": "Total funded balance (fiat purchases + tier bonuses)"
              },
              "funded_balance_usd": {
                "type": "string"
              },
              "has_recovery": {
                "type": "boolean",
                "description": "Whether recovery is set up for this account"
              },
              "promotional_balance_atomic": {
                "type": "integer",
                "format": "int64",
                "description": "Total promotional balance (bonuses, daily claims, referrals, admin grants)"
              },
              "promotional_balance_usd": {
                "type": "string"
              },
              "recovery_warning": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Warning if funds exist but no recovery is set up"
              },
              "total_purchases_cents": {
                "type": "integer",
                "format": "int64",
                "description": "Total lifetime SerenBucks purchases in cents (for plan upgrade tracking)"
              },
              "total_purchases_usd": {
                "type": "string"
              },
              "wallet_address": {
                "type": "string"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_WalletRecoverResponse": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Response from wallet recovery endpoint.",
            "required": [
              "success",
              "message",
              "agent",
              "setup",
              "skill_files",
              "new_recovery_code"
            ],
            "properties": {
              "agent": {
                "$ref": "#/components/schemas/AgentInfo",
                "description": "The recovered agent account (with a new API key)"
              },
              "message": {
                "type": "string",
                "description": "Message about recovery result"
              },
              "new_recovery_code": {
                "type": "string",
                "description": "New recovery code (the old one has been rotated). Save this securely!"
              },
              "setup": {
                "$ref": "#/components/schemas/SetupInstructions",
                "description": "Setup instructions for getting started"
              },
              "skill_files": {
                "$ref": "#/components/schemas/SkillFiles",
                "description": "Links to skill files and documentation"
              },
              "success": {
                "type": "boolean",
                "description": "Whether recovery was successful"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_WalletTransactionHistoryResponse": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Response for transaction history",
            "required": [
              "transactions",
              "total",
              "limit",
              "offset"
            ],
            "properties": {
              "limit": {
                "type": "integer",
                "format": "int64"
              },
              "offset": {
                "type": "integer",
                "format": "int64"
              },
              "total": {
                "type": "integer",
                "format": "int64"
              },
              "transactions": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/WalletTransactionResponse"
                }
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_WebhookCreated": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Webhook created response (includes secret on creation only)",
            "required": [
              "webhook",
              "secret"
            ],
            "properties": {
              "secret": {
                "type": "string",
                "description": "The webhook secret - only shown once at creation time"
              },
              "webhook": {
                "$ref": "#/components/schemas/WebhookInfo"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_WebhookInfo": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "object",
            "description": "Webhook response (hides secret)",
            "required": [
              "id",
              "organization_id",
              "name",
              "url",
              "events",
              "enabled",
              "created_by",
              "created_at"
            ],
            "properties": {
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "created_by": {
                "type": "string",
                "format": "uuid"
              },
              "enabled": {
                "type": "boolean"
              },
              "events": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "id": {
                "type": "string",
                "format": "uuid"
              },
              "name": {
                "type": "string"
              },
              "organization_id": {
                "type": "string",
                "format": "uuid"
              },
              "project_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid"
              },
              "url": {
                "type": "string"
              }
            }
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DataResponse_bool": {
        "type": "object",
        "description": "Generic API response wrapper with optional pagination\n\nThis wrapper provides a consistent structure for all API responses,\nmaking it easier for clients to handle responses uniformly. It supports\nboth single resources and collections, with optional pagination metadata.\n\n# Response Structure\n\n```json\n{\n  \"data\": T,\n  \"pagination\": { ... } // optional\n}\n```\n\n# Examples\n\n## Single Resource\n\n```rust\nuse seren_core::http::DataResponse;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet project = Project {\n    id: \"123\".to_string(),\n    name: \"My Project\".to_string(),\n};\n\nlet response = DataResponse::new(project);\n// Serializes to: {\"data\": {\"id\": \"123\", \"name\": \"My Project\"}}\n```\n\n## Collection with Pagination\n\n```rust\nuse seren_core::http::DataResponse;\nuse seren_core::pagination::PaginationMeta;\nuse serde::Serialize;\n\n#[derive(Serialize)]\nstruct Project {\n    id: String,\n    name: String,\n}\n\nlet projects: Vec<Project> = Vec::new();\nlet pagination = PaginationMeta {\n    total: 0,\n    count: 0,\n    limit: 20,\n    offset: 0,\n    has_more: false,\n};\n\nlet response = DataResponse::with_pagination(projects, pagination);\n// Serializes to: {\"data\": [...], \"pagination\": {\"total\": 0, \"count\": 0, \"limit\": 20, \"offset\": 0, \"has_more\": false}}\n```",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "boolean"
          },
          "pagination": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PaginationMeta",
                "description": "Optional pagination metadata"
              }
            ]
          }
        }
      },
      "DatabaseQueryRequest": {
        "type": "object",
        "description": "Request body for database queries",
        "required": [
          "query"
        ],
        "properties": {
          "database": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional database name (primarily for SerenDB publishers)"
          },
          "params": {
            "type": "array",
            "items": {},
            "description": "Query parameters"
          },
          "query": {
            "type": "string",
            "description": "Query payload to execute.\n\n- SQL publishers (serendb/neon/supabase): SQL string\n- MongoDB publishers: JSON string matching `MongoDbQuery`"
          }
        }
      },
      "DatabaseType": {
        "type": "string",
        "description": "Database type - specific database provider when publisher_category = Database",
        "enum": [
          "serendb",
          "neon",
          "supabase",
          "mongodb"
        ]
      },
      "DatabaseWithContext": {
        "type": "object",
        "description": "Database with full project and branch context for cross-project listing",
        "required": [
          "id",
          "name",
          "project_id",
          "project_name",
          "branch_id",
          "branch_name",
          "is_default_branch",
          "created_at"
        ],
        "properties": {
          "branch_id": {
            "type": "string",
            "format": "uuid",
            "description": "Branch ID"
          },
          "branch_name": {
            "type": "string",
            "description": "Human-readable branch name"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Database ID"
          },
          "is_default_branch": {
            "type": "boolean",
            "description": "Whether this is the project's default branch"
          },
          "name": {
            "type": "string",
            "description": "Database name"
          },
          "owner_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Database owner role name"
          },
          "project_id": {
            "type": "string",
            "format": "uuid",
            "description": "Project ID"
          },
          "project_name": {
            "type": "string",
            "description": "Human-readable project name"
          }
        }
      },
      "DelegationType": {
        "type": "string",
        "enum": [
          "in_loop",
          "full_handoff"
        ]
      },
      "DepositRequest": {
        "type": "object",
        "description": "Request to deposit funds via Stripe",
        "required": [
          "amount_cents"
        ],
        "properties": {
          "amount_cents": {
            "type": "integer",
            "format": "int64",
            "description": "Amount in USD cents (minimum 500 = $5.00)"
          },
          "referral_code": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional affiliate referral code for tracking"
          }
        }
      },
      "DepositResponse": {
        "type": "object",
        "description": "Response for wallet deposit initiation",
        "required": [
          "deposit_id",
          "checkout_url",
          "amount_atomic",
          "bonus_atomic",
          "total_atomic",
          "amount_usd",
          "bonus_usd",
          "total_usd"
        ],
        "properties": {
          "amount_atomic": {
            "type": "integer",
            "format": "int64",
            "description": "Base deposit amount in atomic units"
          },
          "amount_usd": {
            "type": "string"
          },
          "bonus_atomic": {
            "type": "integer",
            "format": "int64",
            "description": "Tier bonus in atomic units (if applicable)"
          },
          "bonus_usd": {
            "type": "string"
          },
          "checkout_url": {
            "type": "string",
            "description": "URL to the Stripe hosted checkout page - open this in a browser to complete payment"
          },
          "deposit_id": {
            "type": "string",
            "format": "uuid"
          },
          "total_atomic": {
            "type": "integer",
            "format": "int64",
            "description": "Total to be credited in atomic units"
          },
          "total_usd": {
            "type": "string"
          }
        }
      },
      "Eip712Domain": {
        "type": "object",
        "description": "EIP-712 domain (matches ethereum.rs Eip712Domain)",
        "required": [
          "name",
          "version",
          "chainId",
          "verifyingContract"
        ],
        "properties": {
          "chainId": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          },
          "name": {
            "type": "string"
          },
          "verifyingContract": {
            "type": "string"
          },
          "version": {
            "type": "string"
          }
        }
      },
      "Eip712Message": {
        "type": "object",
        "description": "EIP-712 message for TransferWithAuthorization",
        "required": [
          "from",
          "to",
          "value",
          "validAfter",
          "validBefore",
          "nonce"
        ],
        "properties": {
          "from": {
            "type": "string"
          },
          "nonce": {
            "type": "string"
          },
          "to": {
            "type": "string"
          },
          "validAfter": {
            "type": "string"
          },
          "validBefore": {
            "type": "string"
          },
          "value": {
            "type": "string"
          }
        }
      },
      "Eip712TypedData": {
        "type": "object",
        "description": "EIP-712 typed data for signing payment authorization",
        "required": [
          "types",
          "primaryType",
          "domain",
          "message"
        ],
        "properties": {
          "domain": {
            "$ref": "#/components/schemas/Eip712Domain"
          },
          "message": {
            "$ref": "#/components/schemas/Eip712Message"
          },
          "primaryType": {
            "type": "string"
          },
          "types": {
            "$ref": "#/components/schemas/Eip712Types"
          }
        }
      },
      "Eip712Types": {
        "type": "object",
        "description": "EIP-712 type definitions",
        "required": [
          "EIP712Domain",
          "TransferWithAuthorization"
        ],
        "properties": {
          "EIP712Domain": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TypedParam"
            }
          },
          "TransferWithAuthorization": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TypedParam"
            }
          }
        }
      },
      "Email": {
        "type": "string",
        "description": "A validated email address.\n\nThis type ensures email addresses are validated at construction time.\nStored as TEXT in the database via SQLx's transparent encoding.\n\n# Examples\n\n```\nuse seren_core::models::Email;\n\nlet email = Email::new(\"user@example.com\").unwrap();\nassert!(Email::new(\"invalid\").is_err());\n```",
        "example": "user@example.com"
      },
      "EndpointBillingEvents": {
        "type": "object",
        "description": "Combined debug response for an endpoint's billing events",
        "required": [
          "organization_id",
          "endpoint_id",
          "usage_events",
          "compute_usage_events"
        ],
        "properties": {
          "compute_usage_events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ComputeUsageEventDebugRecord"
            }
          },
          "endpoint_id": {
            "type": "string"
          },
          "organization_id": {
            "type": "string"
          },
          "usage_events": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/UsageEventDebugRecord"
            }
          }
        }
      },
      "EndpointDefinition": {
        "type": "object",
        "description": "A structured endpoint definition for LLM discoverability and access control",
        "required": [
          "method",
          "path"
        ],
        "properties": {
          "body_template": {
            "description": "Template for request body with {{query}} placeholder for user input\nUsed by browser extensions and LLMs to construct valid requests"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable description of what this endpoint does"
          },
          "example_request": {
            "description": "Example request body"
          },
          "example_response": {
            "description": "Example response body"
          },
          "is_default": {
            "type": "boolean",
            "description": "Whether this is the default endpoint for simple queries\nWhen multiple endpoints exist, the default is used for basic operations"
          },
          "is_protected": {
            "type": "boolean",
            "description": "Whether this endpoint is blocked from agent access\nProtected endpoints are documented but return 403 if called"
          },
          "method": {
            "$ref": "#/components/schemas/HttpMethod",
            "description": "HTTP method (GET, POST, PUT, DELETE, PATCH)"
          },
          "path": {
            "type": "string",
            "description": "Path relative to api_url (e.g., \"/chat/completions\")"
          },
          "price": {
            "type": [
              "string",
              "null"
            ],
            "description": "Endpoint-specific price override (in asset decimals, e.g., \"0.49\" for $0.49)\nIf set, takes precedence over method-level pricing (price_per_post, etc.)"
          },
          "protection_reason": {
            "type": [
              "string",
              "null"
            ],
            "description": "Reason for protection (shown in 403 response, e.g., \"Data redistribution policy\")"
          },
          "query_params": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/QueryParamDefinition"
            },
            "description": "Query parameter definitions"
          },
          "request_body": {
            "description": "Request body schema (JSON Schema or simplified description)"
          },
          "required_headers": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Headers required for this endpoint (beyond publisher defaults)"
          },
          "response": {
            "description": "Response schema (JSON Schema or simplified description)"
          }
        }
      },
      "EstimateRequestBody": {
        "type": "object",
        "description": "Query estimate request body",
        "required": [
          "publisher_id",
          "query"
        ],
        "properties": {
          "asset_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Optional asset id to estimate pricing for (defaults to publisher primary asset)"
          },
          "publisher_id": {
            "type": "string",
            "format": "uuid",
            "description": "Publisher UUID"
          },
          "query": {
            "type": "string",
            "description": "Query payload to estimate.\n\n- SQL publishers (serendb/neon/supabase): SQL string\n- MongoDB publishers: JSON string matching `MongoDbQuery`"
          }
        }
      },
      "EstimateResponse": {
        "type": "object",
        "description": "Query estimate response",
        "required": [
          "estimated_rows",
          "estimated_cost",
          "asset_symbol",
          "estimated_cost_atomic",
          "publisher_name",
          "publisher_slug"
        ],
        "properties": {
          "asset_symbol": {
            "type": "string",
            "description": "Asset symbol (e.g., USDC, USDT)"
          },
          "estimated_cost": {
            "type": "string",
            "description": "Estimated cost in configured asset"
          },
          "estimated_cost_atomic": {
            "type": "integer",
            "format": "int64",
            "description": "Estimated cost in atomic units"
          },
          "estimated_rows": {
            "type": "integer",
            "format": "int64",
            "description": "Estimated rows to be returned"
          },
          "publisher_name": {
            "type": "string",
            "description": "Publisher name"
          },
          "publisher_slug": {
            "type": "string",
            "description": "Publisher slug"
          }
        }
      },
      "EvalMatrixEntry": {
        "type": "object",
        "required": [
          "score",
          "signal_count"
        ],
        "properties": {
          "score": {
            "type": "number",
            "format": "double"
          },
          "signal_count": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "EvalMatrixResponse": {
        "type": "object",
        "required": [
          "matrix",
          "generated_at",
          "total_signals"
        ],
        "properties": {
          "generated_at": {
            "type": "string",
            "format": "date-time"
          },
          "matrix": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "additionalProperties": {
                "$ref": "#/components/schemas/EvalMatrixEntry"
              },
              "propertyNames": {
                "type": "string"
              }
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "total_signals": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "EvalSignalItem": {
        "type": "object",
        "required": [
          "task_type",
          "model_id",
          "satisfaction"
        ],
        "properties": {
          "delegation_type": {
            "$ref": "#/components/schemas/DelegationType"
          },
          "had_tool_errors": {
            "type": "boolean"
          },
          "latency_ms": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/LatencyMs"
              }
            ]
          },
          "model_id": {
            "type": "string"
          },
          "satisfaction": {
            "type": "integer",
            "format": "int32"
          },
          "task_type": {
            "$ref": "#/components/schemas/TaskType"
          },
          "token_count": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TokenCount"
              }
            ]
          },
          "tool_ids_used": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "EvalSignalRequest": {
        "type": "object",
        "required": [
          "signals"
        ],
        "properties": {
          "signals": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/EvalSignalItem"
            }
          }
        }
      },
      "EvalSignalResponse": {
        "type": "object",
        "required": [
          "accepted",
          "rejected"
        ],
        "properties": {
          "accepted": {
            "type": "integer",
            "format": "int64"
          },
          "rejected": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "FederatedResourceHistoryResponse": {
        "type": "object",
        "description": "Response for a federation history event with optional publisher metadata.",
        "required": [
          "id",
          "publisher_id",
          "resource_type",
          "external_id",
          "metadata",
          "status",
          "operation",
          "changed_at"
        ],
        "properties": {
          "changed_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "external_id": {
            "type": "string"
          },
          "federation_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "metadata": {},
          "operation": {
            "type": "string"
          },
          "org_database_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "publisher_id": {
            "type": "string",
            "format": "uuid"
          },
          "publisher_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "publisher_slug": {
            "type": [
              "string",
              "null"
            ]
          },
          "resource_type": {
            "type": "string"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "FederatedResourceResponse": {
        "type": "object",
        "description": "Response for a single federated resource",
        "required": [
          "id",
          "publisher_id",
          "resource_type",
          "external_id",
          "metadata",
          "status",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "external_id": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "metadata": {},
          "org_database_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "publisher_id": {
            "type": "string",
            "format": "uuid"
          },
          "resource_type": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "FederatedResourceWithPublisherResponse": {
        "type": "object",
        "description": "Response for a federated resource with publisher info",
        "required": [
          "id",
          "publisher_id",
          "publisher_slug",
          "publisher_name",
          "resource_type",
          "external_id",
          "metadata",
          "status",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "external_id": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "metadata": {},
          "org_database_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "publisher_id": {
            "type": "string",
            "format": "uuid"
          },
          "publisher_name": {
            "type": "string"
          },
          "publisher_slug": {
            "type": "string"
          },
          "resource_type": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "FederationHistoryStatsResponse": {
        "type": "object",
        "description": "Response for federation history aggregate statistics.",
        "required": [
          "total_events",
          "unique_resources",
          "unique_publishers",
          "by_operation",
          "by_type",
          "by_status"
        ],
        "properties": {
          "by_operation": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int64"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "by_status": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int64"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "by_type": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int64"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "total_events": {
            "type": "integer",
            "format": "int64"
          },
          "unique_publishers": {
            "type": "integer",
            "format": "int64"
          },
          "unique_resources": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "FederationStatsResponse": {
        "type": "object",
        "description": "Response for federation statistics",
        "required": [
          "total_active",
          "by_type",
          "by_status"
        ],
        "properties": {
          "by_status": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int64"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "by_type": {
            "type": "object",
            "additionalProperties": {
              "type": "integer",
              "format": "int64"
            },
            "propertyNames": {
              "type": "string"
            }
          },
          "total_active": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "ForgotPasswordRequest": {
        "type": "object",
        "required": [
          "email"
        ],
        "properties": {
          "email": {
            "$ref": "#/components/schemas/Email"
          }
        }
      },
      "GenerateInvoicesRequest": {
        "type": "object",
        "required": [
          "year",
          "month"
        ],
        "properties": {
          "month": {
            "type": "integer",
            "format": "int32",
            "minimum": 0
          },
          "year": {
            "type": "integer",
            "format": "int32"
          }
        }
      },
      "GeoRestrictedError": {
        "type": "object",
        "description": "Error response when a publisher uses opt_in routing and the user has not opted in",
        "required": [
          "error",
          "message",
          "publisher",
          "proxy_region",
          "opt_in_endpoint"
        ],
        "properties": {
          "error": {
            "type": "string"
          },
          "message": {
            "type": "string"
          },
          "opt_in_endpoint": {
            "type": "string"
          },
          "proxy_region": {
            "type": "string"
          },
          "publisher": {
            "type": "string"
          }
        }
      },
      "GeoRoutingConfig": {
        "type": "object",
        "required": [
          "proxy_region"
        ],
        "properties": {
          "mode": {
            "$ref": "#/components/schemas/GeoRoutingMode",
            "description": "Routing mode (defaults to `always`)."
          },
          "proxy_region": {
            "type": "string",
            "description": "Proxy region to route through (e.g., \"EU\")"
          }
        }
      },
      "GeoRoutingMode": {
        "type": "string",
        "description": "Geographic routing configuration for publishers whose upstream API\nshould be accessed through a regional proxy.\n\nTwo modes:\n- `\"always\"`: all requests are routed through the proxy (e.g., upstream blocks US IPs)\n- `\"opt_in\"`: users can choose to route through the proxy via `/user/routing`",
        "enum": [
          "always",
          "opt_in"
        ]
      },
      "HttpMethod": {
        "type": "string",
        "description": "HTTP method for endpoint definitions",
        "enum": [
          "GET",
          "POST",
          "PUT",
          "DELETE",
          "PATCH"
        ]
      },
      "IntegrationType": {
        "type": "string",
        "description": "Integration type - specific integration when publisher_category = Integration",
        "enum": [
          "api",
          "mcp"
        ]
      },
      "InvocationCostBreakdown": {
        "type": "object",
        "description": "Cost breakdown for template invocation response",
        "required": [
          "publisherFee",
          "llmCost",
          "computeCost",
          "total",
          "llmKeyUsed"
        ],
        "properties": {
          "computeCost": {
            "type": "string"
          },
          "llmCost": {
            "type": "string"
          },
          "llmKeyUsed": {
            "type": "string"
          },
          "publisherFee": {
            "type": "string"
          },
          "total": {
            "type": "string"
          }
        }
      },
      "Invoice": {
        "type": "object",
        "description": "Invoice response with line items",
        "required": [
          "id",
          "organization_id",
          "invoice_number",
          "period_start",
          "period_end",
          "subtotal_usd",
          "tax_usd",
          "total_usd",
          "status",
          "line_items"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "invoice_number": {
            "type": "string"
          },
          "line_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceLineItem"
            }
          },
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "period_end": {
            "type": "string"
          },
          "period_start": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "subtotal_usd": {
            "type": "string"
          },
          "tax_usd": {
            "type": "string"
          },
          "total_usd": {
            "type": "string"
          }
        }
      },
      "InvoiceLineItem": {
        "type": "object",
        "description": "Invoice line item response",
        "required": [
          "description",
          "line_type",
          "quantity",
          "unit_price",
          "amount_usd"
        ],
        "properties": {
          "amount_usd": {
            "type": "string"
          },
          "description": {
            "type": "string"
          },
          "line_type": {
            "type": "string"
          },
          "quantity": {
            "type": "string"
          },
          "unit_price": {
            "type": "string"
          }
        }
      },
      "InvoicesGenerated": {
        "type": "object",
        "description": "Response for invoice generation",
        "required": [
          "invoice_ids",
          "count"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "minimum": 0
          },
          "invoice_ids": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            }
          }
        }
      },
      "InvokeTemplateRequest": {
        "type": "object",
        "description": "Request to invoke an agent template",
        "required": [
          "input"
        ],
        "properties": {
          "input": {
            "description": "Input data to pass to the template"
          }
        }
      },
      "InvokeTemplateResponse": {
        "type": "object",
        "description": "Response from invoking a template",
        "required": [
          "result",
          "cost",
          "executionTimeMs",
          "invocationId"
        ],
        "properties": {
          "cost": {
            "$ref": "#/components/schemas/InvocationCostBreakdown",
            "description": "Cost breakdown"
          },
          "executionTimeMs": {
            "type": "integer",
            "format": "int32",
            "description": "Execution time in milliseconds"
          },
          "invocationId": {
            "type": "string",
            "format": "uuid",
            "description": "Invocation ID for tracking"
          },
          "result": {
            "description": "Output from template execution"
          }
        }
      },
      "LatencyMs": {
        "type": "object",
        "properties": {
          "first": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "total": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          }
        }
      },
      "LlmConfig": {
        "type": "object",
        "description": "LLM configuration for templates",
        "required": [
          "provider",
          "model"
        ],
        "properties": {
          "apiKey": {
            "type": [
              "string",
              "null"
            ],
            "description": "API key (optional, will be encrypted)"
          },
          "model": {
            "type": "string",
            "description": "Model name (e.g., \"gpt-4o\", \"claude-3-opus\")"
          },
          "provider": {
            "type": "string",
            "description": "LLM provider (e.g., \"openai\", \"anthropic\")"
          }
        }
      },
      "LoginResult": {
        "type": "object",
        "required": [
          "access_token",
          "refresh_token",
          "expires_in",
          "user",
          "default_organization_id"
        ],
        "properties": {
          "access_token": {
            "type": "string"
          },
          "default_organization_id": {
            "type": "string",
            "format": "uuid",
            "description": "The user's default organization ID for API calls requiring an organization context.\nThis is typically the first organization the user joined (their personal org)."
          },
          "expires_in": {
            "type": "integer",
            "format": "int64"
          },
          "refresh_token": {
            "type": "string"
          },
          "user": {
            "$ref": "#/components/schemas/UserInfo"
          }
        }
      },
      "LogoUploadRequest": {
        "type": "object",
        "description": "Logo upload request body",
        "required": [
          "logo",
          "content_type"
        ],
        "properties": {
          "content_type": {
            "type": "string",
            "description": "Content type of the image (image/png, image/jpeg, image/webp, image/svg+xml)"
          },
          "logo": {
            "type": "string",
            "description": "Base64 encoded image data"
          }
        }
      },
      "LogoUploadResponse": {
        "type": "object",
        "description": "Logo upload response",
        "required": [
          "message",
          "logo_url"
        ],
        "properties": {
          "logo_url": {
            "type": "string",
            "description": "URL to access the uploaded logo"
          },
          "message": {
            "type": "string",
            "description": "Message indicating success"
          }
        }
      },
      "OAuthProviderResponse": {
        "type": "object",
        "description": "Response type for OAuth provider (excludes sensitive fields like client_secret)",
        "required": [
          "id",
          "slug",
          "name",
          "authorization_url",
          "token_url",
          "client_id",
          "scopes",
          "pkce_required",
          "token_endpoint_auth_method",
          "is_active",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "authorization_url": {
            "type": "string"
          },
          "client_id": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "is_active": {
            "type": "boolean"
          },
          "logo_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "organization_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "pkce_required": {
            "type": "boolean"
          },
          "revocation_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "slug": {
            "type": "string"
          },
          "token_endpoint_auth_method": {
            "type": "string"
          },
          "token_url": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "userinfo_url": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "OffsetPaginationMeta": {
        "type": "object",
        "description": "Offset-based pagination metadata\n\nUsed for APIs that use limit/offset pagination instead of page/per_page.\nStandard fields following REST API conventions.",
        "required": [
          "total",
          "count",
          "limit",
          "offset",
          "has_more"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "description": "Number of items in this response",
            "minimum": 0
          },
          "has_more": {
            "type": "boolean",
            "description": "Whether more items exist beyond this page"
          },
          "limit": {
            "type": "integer",
            "format": "int64",
            "description": "Maximum items requested"
          },
          "offset": {
            "type": "integer",
            "format": "int64",
            "description": "Starting offset"
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "Total number of items across all pages",
            "minimum": 0
          }
        }
      },
      "OnchainDepositRequest": {
        "type": "object",
        "description": "Request body for on-chain deposit",
        "required": [
          "publisher_id",
          "amount"
        ],
        "properties": {
          "amount": {
            "type": "string",
            "description": "Amount to deposit in the configured asset (decimal string, e.g., \"10.50\")"
          },
          "asset_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Optional asset id to deposit (defaults to publisher primary asset)"
          },
          "publisher_id": {
            "type": "string",
            "format": "uuid",
            "description": "Publisher to deposit funds for"
          }
        }
      },
      "OnchainDepositResponse": {
        "type": "object",
        "description": "Response after successful on-chain deposit",
        "required": [
          "message",
          "deposited_amount",
          "balance_amount",
          "asset_symbol",
          "publisher_id",
          "agent_wallet"
        ],
        "properties": {
          "agent_wallet": {
            "$ref": "#/components/schemas/WalletAddress",
            "description": "Agent wallet address"
          },
          "asset_symbol": {
            "type": "string",
            "description": "Asset symbol (e.g., USDC, USDT)"
          },
          "balance_amount": {
            "type": "string",
            "description": "New balance (configured asset)"
          },
          "deposited_amount": {
            "type": "string",
            "description": "Amount deposited (configured asset)"
          },
          "message": {
            "type": "string",
            "description": "Deposit successful message"
          },
          "publisher_id": {
            "type": "string",
            "format": "uuid",
            "description": "Publisher ID"
          },
          "tx_hash": {
            "type": [
              "string",
              "null"
            ],
            "description": "On-chain transaction hash"
          }
        }
      },
      "Organization": {
        "type": "object",
        "required": [
          "id",
          "name",
          "slug",
          "created_by",
          "is_personal",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": "string",
            "format": "uuid"
          },
          "deleted_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "is_personal": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "$ref": "#/components/schemas/Slug"
          },
          "stripe_customer_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Stripe Customer ID for this organization (if billing is enabled)."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "OrganizationConsumption": {
        "type": "object",
        "description": "OrganizationConsumption wraps organization-wide consumption",
        "required": [
          "organization_id",
          "from",
          "to",
          "periods",
          "current_month"
        ],
        "properties": {
          "current_month": {
            "$ref": "#/components/schemas/ConsumptionSummary"
          },
          "from": {
            "type": "string",
            "format": "date-time"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "periods": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ConsumptionPeriodData"
            }
          },
          "to": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "OrganizationInvite": {
        "type": "object",
        "description": "Response type for organization invites (token is not exposed over the API).",
        "required": [
          "id",
          "organization_id",
          "email",
          "role",
          "invited_by",
          "expires_at",
          "created_at"
        ],
        "properties": {
          "accepted_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string"
          },
          "email": {
            "type": "string"
          },
          "expires_at": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "invited_by": {
            "type": "string",
            "format": "uuid"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "revoked_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "role": {
            "type": "string"
          }
        }
      },
      "OrganizationMemberWithUser": {
        "type": "object",
        "description": "Organization member with denormalized user fields for API responses.",
        "required": [
          "id",
          "organization_id",
          "user_id",
          "email",
          "role",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "email": {
            "$ref": "#/components/schemas/Email"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "role": {
            "type": "string"
          },
          "user_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "OrganizationPlan": {
        "type": "object",
        "description": "OrganizationPlan tracks which plan an organization is currently on",
        "required": [
          "id",
          "organization_id",
          "plan_id",
          "started_at",
          "is_trial",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "cancellation_reason": {
            "type": [
              "string",
              "null"
            ]
          },
          "cancelled_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "cancelled_by": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "ends_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "is_trial": {
            "type": "boolean"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "plan_id": {
            "type": "string",
            "format": "uuid"
          },
          "started_at": {
            "type": "string",
            "format": "date-time"
          },
          "stripe_subscription_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "trial_ends_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "OrganizationPlanWithDetails": {
        "type": "object",
        "description": "Response type that includes both the plan and organization_plan details",
        "required": [
          "organization_plan",
          "plan"
        ],
        "properties": {
          "organization_plan": {
            "$ref": "#/components/schemas/OrganizationPlan"
          },
          "plan": {
            "$ref": "#/components/schemas/Plan"
          }
        }
      },
      "OrganizationVpcEndpoint": {
        "type": "object",
        "required": [
          "id",
          "organization_id",
          "region",
          "endpoint_id",
          "state",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "endpoint_id": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "label": {
            "type": [
              "string",
              "null"
            ]
          },
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "region": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "PaginatedResponse_Vec_PublisherResponse": {
        "type": "object",
        "description": "Response wrapper with offset-based pagination\n\nUse this for list endpoints that use limit/offset pagination.",
        "required": [
          "data",
          "pagination"
        ],
        "properties": {
          "data": {
            "type": "array",
            "items": {
              "type": "object",
              "description": "Publisher response (excludes sensitive fields)",
              "required": [
                "id",
                "name",
                "slug",
                "categories",
                "capabilities",
                "use_cases",
                "publisher_type",
                "wallet_address",
                "wallet_network_id",
                "publisher_category",
                "billing_model",
                "gateway_fee_percent",
                "allowed_passthrough_headers",
                "request_content_type",
                "upstream_headers",
                "ownership_tracking_enabled",
                "undocumented_endpoint_policy",
                "is_active",
                "is_verified",
                "total_queries",
                "unique_agents_served",
                "total_revenue_atomic",
                "created_at",
                "updated_at",
                "requires_user_oauth"
              ],
              "properties": {
                "a2a_agent_card": {
                  "description": "Cached A2A agent card"
                },
                "a2a_endpoint_url": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "A2A endpoint base URL (for compute_type = agent)"
                },
                "a2a_health_status": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "A2A health status: unknown, healthy, unhealthy, unreachable"
                },
                "accepted_assets": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "$ref": "#/components/schemas/AssetInfo"
                  },
                  "description": "Accepted assets for payment"
                },
                "allowed_passthrough_headers": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "api_key_header": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Header name to inject upstream_api_key into (e.g., \"Authorization\", \"X-API-Key\")"
                },
                "api_key_query_param": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Query parameter name to inject upstream_api_key into (e.g., \"api_key\", \"apiKey\")"
                },
                "api_url": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "External API URL (for integration_type = api)"
                },
                "billing_model": {
                  "type": "string"
                },
                "branch_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid",
                  "description": "SerenDB branch ID (for database_type = serendb)"
                },
                "capabilities": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Publisher-declared capabilities for task matching"
                },
                "categories": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "compute_type": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/ComputeType",
                      "description": "Compute type when publisher_category = compute"
                    }
                  ]
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "database_config": {
                  "description": "Provider config (sensitive fields redacted)"
                },
                "database_name": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Database name within the SerenDB project"
                },
                "database_type": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/DatabaseType",
                      "description": "Database type when publisher_category = database"
                    }
                  ]
                },
                "description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "email": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Publisher contact email for notifications and support"
                },
                "endpoints": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "$ref": "#/components/schemas/EndpointDefinition"
                  },
                  "description": "Structured endpoint definitions for LLM discoverability and access control"
                },
                "gateway_fee_percent": {
                  "type": "string"
                },
                "id": {
                  "type": "string",
                  "format": "uuid"
                },
                "integration_type": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/IntegrationType",
                      "description": "Integration type when publisher_category = integration"
                    }
                  ]
                },
                "is_active": {
                  "type": "boolean"
                },
                "is_verified": {
                  "type": "boolean"
                },
                "logo_url": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "mcp_capabilities": {
                  "description": "Cached MCP capabilities (tools, resources, prompts)"
                },
                "mcp_endpoint": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "MCP server endpoint URL (for integration_type = mcp)"
                },
                "name": {
                  "type": "string"
                },
                "oauth_provider_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid",
                  "description": "OAuth provider ID for BYOC (Bring Your Own Credentials) authentication"
                },
                "ownership_tracking_enabled": {
                  "type": "boolean"
                },
                "pricing": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "$ref": "#/components/schemas/PricingConfigResponse"
                  },
                  "description": "Pricing config per asset (if included)"
                },
                "project_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "uuid",
                  "description": "SerenDB project ID (for database_type = serendb)"
                },
                "protected_operations": {},
                "publisher_category": {
                  "$ref": "#/components/schemas/PublisherCategory",
                  "description": "Publisher category: database, integration, or compute"
                },
                "publisher_type": {
                  "$ref": "#/components/schemas/PublisherType"
                },
                "request_content_type": {
                  "type": "string",
                  "description": "Content-Type for upstream API requests"
                },
                "requires_user_oauth": {
                  "type": "boolean",
                  "description": "If true, users must connect via OAuth before using this publisher"
                },
                "resource_description": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "resource_id_response_path": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "resource_id_url_pattern": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "resource_name": {
                  "type": [
                    "string",
                    "null"
                  ]
                },
                "routing": {
                  "oneOf": [
                    {
                      "type": "null"
                    },
                    {
                      "$ref": "#/components/schemas/GeoRoutingConfig",
                      "description": "Geographic routing configuration (if publisher has geo-restricted upstream API)"
                    }
                  ]
                },
                "slug": {
                  "type": "string"
                },
                "token_cache_ttl_seconds": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "format": "int32",
                  "description": "TTL for cached exchanged tokens in seconds"
                },
                "token_exchange_method": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "HTTP method for exchange endpoint (POST or GET)"
                },
                "token_exchange_mode": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "How to send Seren token: header, body, or query"
                },
                "token_exchange_url": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "URL to call for exchanging Seren API keys for publisher auth tokens"
                },
                "token_response_field": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "JSON field in exchange response containing the token"
                },
                "total_queries": {
                  "type": "integer",
                  "format": "int64"
                },
                "total_revenue_atomic": {
                  "type": "integer",
                  "format": "int64",
                  "description": "Lifetime total revenue across all assets, in atomic units"
                },
                "undocumented_endpoint_policy": {
                  "$ref": "#/components/schemas/UndocumentedEndpointPolicy",
                  "description": "Policy for handling requests to paths not in the endpoints catalog"
                },
                "unique_agents_served": {
                  "type": "integer",
                  "format": "int64"
                },
                "updated_at": {
                  "type": "string",
                  "format": "date-time"
                },
                "upstream_cost_response_path": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "Dot-separated path to upstream cost in response body (for pay_per_use and prepaid passthrough billing).\nExample: \"usage.cost\""
                },
                "upstream_headers": {
                  "description": "Non-sensitive headers to send to upstream API"
                },
                "usage_examples": {
                  "type": [
                    "array",
                    "null"
                  ],
                  "items": {
                    "$ref": "#/components/schemas/UsageExample"
                  },
                  "description": "Usage examples showing how to call the publisher's API"
                },
                "use_cases": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  },
                  "description": "Human-readable use case descriptions"
                },
                "verification_expires_at": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "format": "date-time",
                  "description": "When verification expires (NULL = no expiry)"
                },
                "wallet_address": {
                  "$ref": "#/components/schemas/WalletAddress"
                },
                "wallet_network_id": {
                  "type": "string",
                  "description": "Network for the wallet address"
                }
              }
            }
          },
          "pagination": {
            "$ref": "#/components/schemas/OffsetPaginationMeta",
            "description": "Pagination metadata"
          }
        }
      },
      "PaginationMeta": {
        "type": "object",
        "description": "Pagination metadata included in responses.",
        "required": [
          "total",
          "count",
          "limit",
          "offset",
          "has_more"
        ],
        "properties": {
          "count": {
            "type": "integer",
            "format": "int64",
            "description": "Number of items in this response"
          },
          "has_more": {
            "type": "boolean",
            "description": "Whether there are more items after this page"
          },
          "limit": {
            "type": "integer",
            "format": "int64",
            "description": "Maximum items per page"
          },
          "offset": {
            "type": "integer",
            "format": "int64",
            "description": "Offset from start"
          },
          "total": {
            "type": "integer",
            "format": "int64",
            "description": "Total number of items across all pages"
          }
        }
      },
      "ParamType": {
        "type": "string",
        "description": "Parameter type for query/path parameters",
        "enum": [
          "string",
          "integer",
          "boolean",
          "number",
          "array"
        ]
      },
      "PasswordReset": {
        "type": "object",
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string"
          }
        }
      },
      "PasswordResetSent": {
        "type": "object",
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string"
          }
        }
      },
      "PaymentHistory": {
        "type": "object",
        "description": "Payment history response",
        "required": [
          "payments"
        ],
        "properties": {
          "payments": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentRecord"
            }
          }
        }
      },
      "PaymentIntentCreated": {
        "type": "object",
        "description": "Response for creating a payment intent",
        "required": [
          "payment_intent_id",
          "client_secret",
          "amount_cents",
          "amount_usd",
          "currency"
        ],
        "properties": {
          "amount_cents": {
            "type": "integer",
            "format": "int64",
            "description": "Amount to be charged, in cents."
          },
          "amount_usd": {
            "type": "string",
            "description": "Amount to be charged, in USD."
          },
          "client_secret": {
            "type": "string"
          },
          "currency": {
            "$ref": "#/components/schemas/CurrencyCode"
          },
          "payment_intent_id": {
            "$ref": "#/components/schemas/StripePaymentIntentId"
          }
        }
      },
      "PaymentMethod": {
        "type": "object",
        "description": "Payment method details",
        "required": [
          "id",
          "type_",
          "is_default"
        ],
        "properties": {
          "bank_last4": {
            "type": [
              "string",
              "null"
            ]
          },
          "card_brand": {
            "type": [
              "string",
              "null"
            ]
          },
          "card_exp_month": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "card_exp_year": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "card_last4": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "is_default": {
            "type": "boolean"
          },
          "type_": {
            "type": "string"
          }
        }
      },
      "PaymentMethodAdded": {
        "type": "object",
        "description": "Response for adding a payment method",
        "required": [
          "id",
          "message"
        ],
        "properties": {
          "id": {
            "type": "string"
          },
          "message": {
            "type": "string"
          }
        }
      },
      "PaymentRecord": {
        "type": "object",
        "description": "Individual payment record",
        "required": [
          "id",
          "stripe_payment_intent_id",
          "amount_usd",
          "currency",
          "status",
          "attempted_at"
        ],
        "properties": {
          "amount_usd": {
            "type": "string"
          },
          "attempted_at": {
            "type": "string"
          },
          "currency": {
            "$ref": "#/components/schemas/CurrencyCode"
          },
          "failed_at": {
            "type": [
              "string",
              "null"
            ]
          },
          "failure_code": {
            "type": [
              "string",
              "null"
            ]
          },
          "failure_message": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "stripe_charge_id": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/StripeChargeId"
              }
            ]
          },
          "stripe_payment_intent_id": {
            "$ref": "#/components/schemas/StripePaymentIntentId"
          },
          "succeeded_at": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "PaymentRequestInfo": {
        "type": "object",
        "description": "Internal payment request tracking (extends with Seren-specific fields)",
        "required": [
          "payment_request_id",
          "publisher_id",
          "expires"
        ],
        "properties": {
          "eip712TypedData": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/Eip712TypedData",
                "description": "EIP-712 typed data for signing (EIP-3009 only)"
              }
            ]
          },
          "estimate": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/CostEstimate",
                "description": "Optional: Estimated cost breakdown"
              }
            ]
          },
          "expires": {
            "type": "integer",
            "format": "int64",
            "description": "Expiration timestamp (Unix seconds)"
          },
          "payment_request_id": {
            "type": "string",
            "description": "Payment request ID for correlation"
          },
          "publisher_id": {
            "type": "string",
            "format": "uuid",
            "description": "Publisher ID"
          }
        }
      },
      "PaymentRequiredResponse": {
        "type": "object",
        "description": "x402 V2 402 Payment Required Response\n\nThe official V2 format with top-level resource info and extensions support.",
        "required": [
          "x402Version",
          "resource",
          "accepts"
        ],
        "properties": {
          "accepts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PaymentRequirements"
            },
            "description": "List of acceptable payment methods"
          },
          "error": {
            "type": [
              "string",
              "null"
            ],
            "description": "Error message explaining why payment is required"
          },
          "extensions": {
            "description": "Optional extensions (V2 feature for protocol extensibility)"
          },
          "resource": {
            "$ref": "#/components/schemas/ResourceInfo",
            "description": "Resource information (V2 - moved to top level)"
          },
          "x402Version": {
            "type": "integer",
            "format": "int32",
            "description": "x402 protocol version (2 for V2)",
            "minimum": 0
          }
        }
      },
      "PaymentRequiredResponseWithInfo": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PaymentRequiredResponse",
            "description": "Protocol response (x402 v2)"
          },
          {
            "type": "object",
            "properties": {
              "seren": {
                "oneOf": [
                  {
                    "type": "null"
                  },
                  {
                    "$ref": "#/components/schemas/PaymentRequestInfo",
                    "description": "Seren-specific payment request info"
                  }
                ]
              }
            }
          }
        ],
        "description": "402 Payment Required response body (x402 v2) with Seren-specific extensions."
      },
      "PaymentRequirements": {
        "type": "object",
        "description": "x402 V2 Payment Requirements\n\nFollows the official x402 V2 specification.\nSee: https://github.com/coinbase/x402/blob/main/typescript/packages/core/src/types/payments.ts",
        "required": [
          "scheme",
          "network",
          "asset",
          "amount",
          "payTo",
          "maxTimeoutSeconds",
          "extra"
        ],
        "properties": {
          "amount": {
            "type": "string",
            "description": "Amount in atomic units (token decimals)"
          },
          "asset": {
            "type": "string",
            "description": "Payment asset address (token contract)"
          },
          "extra": {
            "description": "Extra information about the payment (scheme-specific)\n\nFor EVM/exact scheme, this typically contains:\n- `name`: Asset name (e.g., \"USD Coin\")\n- `version`: Asset version\n- `eip712TypedData`: EIP-712 typed data for signing (EIP-3009)\n- `paymentRequestId`: Correlation ID\n- `expires`: Expiration timestamp\n- `estimate`: Cost breakdown (optional)\n- `settlementMethod`: \"eip3009\" or \"transfer\""
          },
          "maxTimeoutSeconds": {
            "type": "integer",
            "format": "int32",
            "description": "Maximum time in seconds for the resource server to respond"
          },
          "network": {
            "type": "string",
            "description": "Network for payment in CAIP-2 format (e.g., \"eip155:8453\" for Base mainnet)"
          },
          "payTo": {
            "type": "string",
            "description": "Address to pay value to (publisher or gateway wallet)"
          },
          "scheme": {
            "type": "string",
            "description": "Payment scheme (e.g., \"exact\")"
          }
        }
      },
      "PayoutStatus": {
        "type": "string",
        "description": "Status of a publisher payout request.",
        "enum": [
          "queued",
          "processing",
          "completed",
          "failed",
          "cancelled"
        ]
      },
      "Permission": {
        "type": "object",
        "description": "Permission definition",
        "required": [
          "id",
          "name",
          "resource_type",
          "action",
          "created_at"
        ],
        "properties": {
          "action": {
            "type": "string"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "resource_type": {
            "type": "string"
          }
        }
      },
      "Plan": {
        "type": "object",
        "description": "Plan represents a subscription tier (Free, Launch, Scale)",
        "required": [
          "id",
          "name",
          "display_name",
          "price_monthly",
          "max_compute_units",
          "max_branches_per_project",
          "support_level",
          "ip_allowlist_enabled",
          "vpc_enabled",
          "sso_enabled",
          "audit_logs_enabled",
          "monitoring_enabled",
          "is_active",
          "sort_order",
          "created_at",
          "updated_at"
        ],
        "properties": {
          "audit_logs_enabled": {
            "type": "boolean"
          },
          "branch_price_per_hour": {
            "type": [
              "string",
              "null"
            ]
          },
          "compute_hours_quota": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "compute_price_per_cu_hour": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "data_transfer_gb_included": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "data_transfer_price_per_gb": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "display_name": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "ip_allowlist_enabled": {
            "type": "boolean"
          },
          "is_active": {
            "type": "boolean"
          },
          "max_branches_per_project": {
            "type": "integer",
            "format": "int32"
          },
          "max_compute_units": {
            "type": "integer",
            "format": "int32"
          },
          "max_databases_per_branch": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "max_endpoints_per_branch": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "max_projects": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "monitoring_enabled": {
            "type": "boolean"
          },
          "monitoring_retention_days": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "name": {
            "type": "string"
          },
          "pitr_price_per_gb_month": {
            "type": [
              "string",
              "null"
            ]
          },
          "pitr_retention_hours": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "price_monthly": {
            "type": "string"
          },
          "scale_to_zero_delay_seconds": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "sla_uptime_percent": {
            "type": [
              "string",
              "null"
            ]
          },
          "sort_order": {
            "type": "integer",
            "format": "int32"
          },
          "sso_enabled": {
            "type": "boolean"
          },
          "storage_gb_quota": {
            "type": [
              "string",
              "null"
            ]
          },
          "storage_price_per_gb_month": {
            "type": [
              "string",
              "null"
            ]
          },
          "stripe_price_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Stripe Price ID used for recurring subscriptions on this plan (for paid tiers)."
          },
          "support_level": {
            "type": "string"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "vpc_enabled": {
            "type": "boolean"
          }
        }
      },
      "PricingConfigResponse": {
        "type": "object",
        "description": "Pricing config response",
        "required": [
          "asset_id",
          "pricing_model",
          "base_price_per_1000_rows",
          "markup_multiplier",
          "min_charge",
          "payment_expiry_minutes",
          "prepaid_enabled",
          "onchain_enabled",
          "minimum_balance",
          "low_balance_threshold"
        ],
        "properties": {
          "asset_id": {
            "type": "string",
            "format": "uuid",
            "description": "Asset this pricing applies to"
          },
          "asset_symbol": {
            "type": [
              "string",
              "null"
            ],
            "description": "Asset symbol for display"
          },
          "base_price_per_1000_rows": {
            "type": "string"
          },
          "grace_period_minutes": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "hourly_rate": {
            "type": [
              "string",
              "null"
            ]
          },
          "low_balance_threshold": {
            "type": "string"
          },
          "markup_multiplier": {
            "type": "string"
          },
          "max_queries_per_minute": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "min_charge": {
            "type": "string"
          },
          "min_display_price": {
            "type": [
              "string",
              "null"
            ],
            "description": "Minimum price to display in UI for passthrough publishers (informational only)"
          },
          "minimum_balance": {
            "type": "string"
          },
          "onchain_enabled": {
            "type": "boolean"
          },
          "payment_expiry_minutes": {
            "type": "integer",
            "format": "int32"
          },
          "prepaid_enabled": {
            "type": "boolean"
          },
          "price_per_call": {
            "type": [
              "string",
              "null"
            ]
          },
          "price_per_delete": {
            "type": [
              "string",
              "null"
            ]
          },
          "price_per_execution": {
            "type": [
              "string",
              "null"
            ],
            "description": "Price per execution for agent templates or usage-based billing"
          },
          "price_per_get": {
            "type": [
              "string",
              "null"
            ]
          },
          "price_per_patch": {
            "type": [
              "string",
              "null"
            ]
          },
          "price_per_post": {
            "type": [
              "string",
              "null"
            ]
          },
          "price_per_put": {
            "type": [
              "string",
              "null"
            ]
          },
          "pricing_display_text": {
            "type": [
              "string",
              "null"
            ],
            "description": "Text to display for variable pricing (e.g., \"Varies by model\")"
          },
          "pricing_model": {
            "$ref": "#/components/schemas/PricingModel"
          },
          "reserve_max_charge": {
            "type": [
              "string",
              "null"
            ]
          },
          "unresolved_fallback_charge": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "PricingModel": {
        "type": "string",
        "description": "Pricing model used to interpret pricing units.",
        "enum": [
          "per_row",
          "per_request",
          "per_byte",
          "tiered",
          "passthrough"
        ]
      },
      "PricingSummary": {
        "type": "object",
        "description": "Simplified pricing summary for suggestions",
        "properties": {
          "base_price_per_1000_rows": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "ProvidersResponse": {
        "type": "object",
        "required": [
          "providers"
        ],
        "properties": {
          "providers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublisherOAuthProviderResponse"
            }
          }
        }
      },
      "PublisherAgentBalance": {
        "type": "object",
        "required": [
          "serenbucks_atomic",
          "total_available_atomic"
        ],
        "properties": {
          "onchain_atomic": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64"
          },
          "serenbucks_atomic": {
            "type": "integer",
            "format": "int64"
          },
          "total_available_atomic": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "PublisherAnalytics": {
        "type": "object",
        "description": "Response for publisher analytics",
        "required": [
          "publisher_id",
          "templates",
          "totals"
        ],
        "properties": {
          "publisher_id": {
            "type": "string",
            "format": "uuid"
          },
          "templates": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TemplateAnalytics"
            }
          },
          "totals": {
            "$ref": "#/components/schemas/PublisherAnalyticsTotals"
          }
        }
      },
      "PublisherAnalyticsTotals": {
        "type": "object",
        "description": "Aggregated totals for publisher analytics",
        "required": [
          "total_templates",
          "total_invocations",
          "successful_invocations",
          "failed_invocations",
          "overall_success_rate",
          "unique_agents_served",
          "total_revenue_atomic",
          "total_revenue_usd"
        ],
        "properties": {
          "failed_invocations": {
            "type": "integer",
            "format": "int64"
          },
          "overall_success_rate": {
            "type": "number",
            "format": "double"
          },
          "successful_invocations": {
            "type": "integer",
            "format": "int64"
          },
          "total_invocations": {
            "type": "integer",
            "format": "int64"
          },
          "total_revenue_atomic": {
            "type": "integer",
            "format": "int64"
          },
          "total_revenue_usd": {
            "type": "string"
          },
          "total_templates": {
            "type": "integer",
            "format": "int64"
          },
          "unique_agents_served": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "PublisherCategory": {
        "type": "string",
        "description": "Publisher category - the primary classification of what a publisher offers",
        "enum": [
          "database",
          "integration",
          "compute"
        ]
      },
      "PublisherChargeInfo": {
        "type": "object",
        "required": [
          "id",
          "status",
          "amount_atomic",
          "agent_wallet"
        ],
        "properties": {
          "agent_wallet": {
            "type": "string"
          },
          "amount_atomic": {
            "type": "integer",
            "format": "int64"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string"
          }
        }
      },
      "PublisherEarningsResponse": {
        "type": "object",
        "description": "Publisher earnings summary response (per asset).",
        "required": [
          "publisher_id",
          "publisher_name",
          "publisher_slug",
          "wallet_address",
          "asset",
          "total_revenue",
          "total_withdrawn",
          "pending_payout",
          "available",
          "total_revenue_atomic",
          "total_withdrawn_atomic",
          "pending_payout_atomic",
          "available_atomic",
          "request_count"
        ],
        "properties": {
          "asset": {
            "$ref": "#/components/schemas/AssetInfo"
          },
          "available": {
            "type": "number",
            "format": "double"
          },
          "available_atomic": {
            "type": "integer",
            "format": "int64"
          },
          "pending_payout": {
            "type": "number",
            "format": "double"
          },
          "pending_payout_atomic": {
            "type": "integer",
            "format": "int64"
          },
          "publisher_id": {
            "type": "string",
            "format": "uuid"
          },
          "publisher_name": {
            "type": "string"
          },
          "publisher_slug": {
            "type": "string"
          },
          "request_count": {
            "type": "integer",
            "format": "int64",
            "description": "Count of billable transactions for this asset (query_charge, api_call, service_fee)."
          },
          "total_revenue": {
            "type": "number",
            "format": "double"
          },
          "total_revenue_atomic": {
            "type": "integer",
            "format": "int64"
          },
          "total_withdrawn": {
            "type": "number",
            "format": "double"
          },
          "total_withdrawn_atomic": {
            "type": "integer",
            "format": "int64"
          },
          "wallet_address": {
            "$ref": "#/components/schemas/WalletAddress"
          }
        }
      },
      "PublisherOAuthProviderResponse": {
        "type": "object",
        "description": "Response type for OAuth provider (excludes sensitive fields)",
        "required": [
          "id",
          "slug",
          "name",
          "scopes",
          "is_active",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "custom_auth_params": {
            "description": "Custom provider-specific authorization URL parameters"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "is_active": {
            "type": "boolean"
          },
          "logo_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": "string"
          },
          "organization_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "slug": {
            "type": "string"
          }
        }
      },
      "PublisherPayoutInfo": {
        "type": "object",
        "required": [
          "id",
          "status",
          "amount_atomic",
          "destination_wallet"
        ],
        "properties": {
          "amount_atomic": {
            "type": "integer",
            "format": "int64"
          },
          "destination_wallet": {
            "type": "string"
          },
          "error_message": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string"
          },
          "tx_hash": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "PublisherPayoutResponse": {
        "type": "object",
        "description": "Publisher payout response.",
        "required": [
          "id",
          "publisher_id",
          "asset",
          "amount",
          "amount_atomic",
          "destination_wallet",
          "status",
          "requested_at"
        ],
        "properties": {
          "amount": {
            "type": "number",
            "format": "double"
          },
          "amount_atomic": {
            "type": "integer",
            "format": "int64"
          },
          "asset": {
            "$ref": "#/components/schemas/AssetInfo"
          },
          "destination_wallet": {
            "$ref": "#/components/schemas/WalletAddress"
          },
          "error_message": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "publisher_id": {
            "type": "string",
            "format": "uuid"
          },
          "requested_at": {
            "type": "string",
            "format": "date-time"
          },
          "status": {
            "$ref": "#/components/schemas/PayoutStatus"
          },
          "tx_hash": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "PublisherResponse": {
        "type": "object",
        "description": "Publisher response (excludes sensitive fields)",
        "required": [
          "id",
          "name",
          "slug",
          "categories",
          "capabilities",
          "use_cases",
          "publisher_type",
          "wallet_address",
          "wallet_network_id",
          "publisher_category",
          "billing_model",
          "gateway_fee_percent",
          "allowed_passthrough_headers",
          "request_content_type",
          "upstream_headers",
          "ownership_tracking_enabled",
          "undocumented_endpoint_policy",
          "is_active",
          "is_verified",
          "total_queries",
          "unique_agents_served",
          "total_revenue_atomic",
          "created_at",
          "updated_at",
          "requires_user_oauth"
        ],
        "properties": {
          "a2a_agent_card": {
            "description": "Cached A2A agent card"
          },
          "a2a_endpoint_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "A2A endpoint base URL (for compute_type = agent)"
          },
          "a2a_health_status": {
            "type": [
              "string",
              "null"
            ],
            "description": "A2A health status: unknown, healthy, unhealthy, unreachable"
          },
          "accepted_assets": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/AssetInfo"
            },
            "description": "Accepted assets for payment"
          },
          "allowed_passthrough_headers": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "api_key_header": {
            "type": [
              "string",
              "null"
            ],
            "description": "Header name to inject upstream_api_key into (e.g., \"Authorization\", \"X-API-Key\")"
          },
          "api_key_query_param": {
            "type": [
              "string",
              "null"
            ],
            "description": "Query parameter name to inject upstream_api_key into (e.g., \"api_key\", \"apiKey\")"
          },
          "api_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "External API URL (for integration_type = api)"
          },
          "billing_model": {
            "type": "string"
          },
          "branch_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "SerenDB branch ID (for database_type = serendb)"
          },
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Publisher-declared capabilities for task matching"
          },
          "categories": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "compute_type": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ComputeType",
                "description": "Compute type when publisher_category = compute"
              }
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "database_config": {
            "description": "Provider config (sensitive fields redacted)"
          },
          "database_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Database name within the SerenDB project"
          },
          "database_type": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DatabaseType",
                "description": "Database type when publisher_category = database"
              }
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "Publisher contact email for notifications and support"
          },
          "endpoints": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/EndpointDefinition"
            },
            "description": "Structured endpoint definitions for LLM discoverability and access control"
          },
          "gateway_fee_percent": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "integration_type": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/IntegrationType",
                "description": "Integration type when publisher_category = integration"
              }
            ]
          },
          "is_active": {
            "type": "boolean"
          },
          "is_verified": {
            "type": "boolean"
          },
          "logo_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "mcp_capabilities": {
            "description": "Cached MCP capabilities (tools, resources, prompts)"
          },
          "mcp_endpoint": {
            "type": [
              "string",
              "null"
            ],
            "description": "MCP server endpoint URL (for integration_type = mcp)"
          },
          "name": {
            "type": "string"
          },
          "oauth_provider_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "OAuth provider ID for BYOC (Bring Your Own Credentials) authentication"
          },
          "ownership_tracking_enabled": {
            "type": "boolean"
          },
          "pricing": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/PricingConfigResponse"
            },
            "description": "Pricing config per asset (if included)"
          },
          "project_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "SerenDB project ID (for database_type = serendb)"
          },
          "protected_operations": {},
          "publisher_category": {
            "$ref": "#/components/schemas/PublisherCategory",
            "description": "Publisher category: database, integration, or compute"
          },
          "publisher_type": {
            "$ref": "#/components/schemas/PublisherType"
          },
          "request_content_type": {
            "type": "string",
            "description": "Content-Type for upstream API requests"
          },
          "requires_user_oauth": {
            "type": "boolean",
            "description": "If true, users must connect via OAuth before using this publisher"
          },
          "resource_description": {
            "type": [
              "string",
              "null"
            ]
          },
          "resource_id_response_path": {
            "type": [
              "string",
              "null"
            ]
          },
          "resource_id_url_pattern": {
            "type": [
              "string",
              "null"
            ]
          },
          "resource_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "routing": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/GeoRoutingConfig",
                "description": "Geographic routing configuration (if publisher has geo-restricted upstream API)"
              }
            ]
          },
          "slug": {
            "type": "string"
          },
          "token_cache_ttl_seconds": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "TTL for cached exchanged tokens in seconds"
          },
          "token_exchange_method": {
            "type": [
              "string",
              "null"
            ],
            "description": "HTTP method for exchange endpoint (POST or GET)"
          },
          "token_exchange_mode": {
            "type": [
              "string",
              "null"
            ],
            "description": "How to send Seren token: header, body, or query"
          },
          "token_exchange_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL to call for exchanging Seren API keys for publisher auth tokens"
          },
          "token_response_field": {
            "type": [
              "string",
              "null"
            ],
            "description": "JSON field in exchange response containing the token"
          },
          "total_queries": {
            "type": "integer",
            "format": "int64"
          },
          "total_revenue_atomic": {
            "type": "integer",
            "format": "int64",
            "description": "Lifetime total revenue across all assets, in atomic units"
          },
          "undocumented_endpoint_policy": {
            "$ref": "#/components/schemas/UndocumentedEndpointPolicy",
            "description": "Policy for handling requests to paths not in the endpoints catalog"
          },
          "unique_agents_served": {
            "type": "integer",
            "format": "int64"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          },
          "upstream_cost_response_path": {
            "type": [
              "string",
              "null"
            ],
            "description": "Dot-separated path to upstream cost in response body (for pay_per_use and prepaid passthrough billing).\nExample: \"usage.cost\""
          },
          "upstream_headers": {
            "description": "Non-sensitive headers to send to upstream API"
          },
          "usage_examples": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/UsageExample"
            },
            "description": "Usage examples showing how to call the publisher's API"
          },
          "use_cases": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Human-readable use case descriptions"
          },
          "verification_expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When verification expires (NULL = no expiry)"
          },
          "wallet_address": {
            "$ref": "#/components/schemas/WalletAddress"
          },
          "wallet_network_id": {
            "type": "string",
            "description": "Network for the wallet address"
          }
        }
      },
      "PublisherRootRequest": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/DatabaseQueryRequest"
          },
          {}
        ],
        "description": "Request body for publisher root `POST /publishers/{slug}`.\n\n- For database publishers: use `DatabaseQueryRequest`\n- For API publishers: any JSON body will be proxied to the upstream API root (`/`)"
      },
      "PublisherSuggestion": {
        "type": "object",
        "description": "A publisher suggestion with match score and reason",
        "required": [
          "slug",
          "name",
          "match_reason",
          "score",
          "capabilities"
        ],
        "properties": {
          "capabilities": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Publisher-declared capabilities"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "match_reason": {
            "type": "string",
            "description": "Why this publisher was suggested"
          },
          "name": {
            "type": "string"
          },
          "pricing": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PricingSummary",
                "description": "Pricing info"
              }
            ]
          },
          "score": {
            "type": "number",
            "format": "double",
            "description": "Match score (0.0 to 1.0)"
          },
          "slug": {
            "type": "string"
          }
        }
      },
      "PublisherType": {
        "type": "string",
        "description": "Type of publisher in the store",
        "enum": [
          "individual",
          "organization",
          "verified_partner"
        ]
      },
      "PublisherTypeInstructions": {
        "type": "object",
        "description": "Instructions for using different publisher types",
        "required": [
          "api",
          "mcp",
          "database"
        ],
        "properties": {
          "api": {
            "type": "string",
            "description": "For API publishers"
          },
          "database": {
            "type": "string",
            "description": "For database publishers"
          },
          "mcp": {
            "type": "string",
            "description": "For MCP publishers"
          }
        }
      },
      "QueryParamDefinition": {
        "type": "object",
        "description": "Query parameter definition for an endpoint",
        "required": [
          "name"
        ],
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable description"
          },
          "example": {
            "type": [
              "string",
              "null"
            ],
            "description": "Example value for documentation"
          },
          "name": {
            "type": "string",
            "description": "Parameter name (e.g., \"id\", \"limit\")"
          },
          "param_type": {
            "$ref": "#/components/schemas/ParamType",
            "description": "Parameter type"
          },
          "required": {
            "type": "boolean",
            "description": "Whether this parameter is required"
          }
        }
      },
      "QuotaUsage": {
        "type": "object",
        "description": "Quota usage summary for an organization",
        "required": [
          "organization_id",
          "plan",
          "current_storage_gb",
          "current_compute_hours",
          "current_serendb_compute_hours",
          "current_cloud_compute_hours",
          "current_projects",
          "current_branches",
          "is_over_storage_quota",
          "is_over_compute_quota",
          "is_over_projects_quota"
        ],
        "properties": {
          "compute_hours_usage_percent": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "current_branches": {
            "type": "integer",
            "format": "int32"
          },
          "current_cloud_compute_hours": {
            "type": "number",
            "format": "double"
          },
          "current_compute_hours": {
            "type": "number",
            "format": "double"
          },
          "current_projects": {
            "type": "integer",
            "format": "int32"
          },
          "current_serendb_compute_hours": {
            "type": "number",
            "format": "double"
          },
          "current_storage_gb": {
            "type": "number",
            "format": "double"
          },
          "is_over_compute_quota": {
            "type": "boolean"
          },
          "is_over_projects_quota": {
            "type": "boolean"
          },
          "is_over_storage_quota": {
            "type": "boolean"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "plan": {
            "$ref": "#/components/schemas/Plan"
          },
          "projects_usage_percent": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          },
          "storage_usage_percent": {
            "type": [
              "number",
              "null"
            ],
            "format": "double"
          }
        }
      },
      "RbacRole": {
        "type": "object",
        "description": "Response after creating or updating a role",
        "required": [
          "id",
          "name",
          "is_built_in",
          "permissions",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "is_built_in": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          },
          "permissions": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "RecoveryResponse": {
        "type": "object",
        "description": "Response for recovery setup",
        "required": [
          "has_recovery",
          "has_recovery_email",
          "message"
        ],
        "properties": {
          "has_recovery": {
            "type": "boolean",
            "description": "Whether recovery is now set up"
          },
          "has_recovery_email": {
            "type": "boolean",
            "description": "Whether a recovery email is set"
          },
          "message": {
            "type": "string",
            "description": "Message about recovery status"
          },
          "recovery_code": {
            "type": [
              "string",
              "null"
            ],
            "description": "Recovery code (only shown once, save it securely!)\nThis is a 24-character code that can be used to recover your account."
          }
        }
      },
      "ReferralInfoResponse": {
        "type": "object",
        "description": "Response for referral info",
        "required": [
          "referral_code",
          "referral_url",
          "total_referrals",
          "total_earnings_atomic",
          "total_earnings_usd",
          "pending_earnings_atomic",
          "pending_earnings_usd"
        ],
        "properties": {
          "pending_earnings_atomic": {
            "type": "integer",
            "format": "int64"
          },
          "pending_earnings_usd": {
            "type": "string"
          },
          "referral_code": {
            "type": "string"
          },
          "referral_url": {
            "type": "string"
          },
          "total_earnings_atomic": {
            "type": "integer",
            "format": "int64"
          },
          "total_earnings_usd": {
            "type": "string"
          },
          "total_referrals": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "RefundChargeRequest": {
        "type": "object",
        "required": [
          "reason"
        ],
        "properties": {
          "reason": {
            "type": "string"
          }
        }
      },
      "ResendVerificationRequest": {
        "type": "object",
        "required": [
          "email"
        ],
        "properties": {
          "email": {
            "$ref": "#/components/schemas/Email"
          }
        }
      },
      "ResetPasswordRequest": {
        "type": "object",
        "required": [
          "token",
          "new_password"
        ],
        "properties": {
          "new_password": {
            "type": "string"
          },
          "token": {
            "type": "string"
          }
        }
      },
      "ResourceInfo": {
        "type": "object",
        "description": "Resource information for x402 V2\n\nIn V2, resource metadata is a top-level field rather than being\nembedded in each payment requirement.",
        "required": [
          "url",
          "description",
          "mimeType"
        ],
        "properties": {
          "description": {
            "type": "string",
            "description": "Human-readable description of the resource"
          },
          "mimeType": {
            "type": "string",
            "description": "MIME type of the resource response"
          },
          "url": {
            "type": "string",
            "description": "URL of the resource being paid for"
          }
        }
      },
      "RevenueByDay": {
        "type": "object",
        "description": "Revenue breakdown by day.",
        "required": [
          "date",
          "revenue_atomic",
          "revenue",
          "query_count",
          "unique_agents"
        ],
        "properties": {
          "date": {
            "type": "string",
            "description": "Date (YYYY-MM-DD)"
          },
          "query_count": {
            "type": "integer",
            "format": "int64",
            "description": "Number of queries on this day"
          },
          "revenue": {
            "type": "string",
            "description": "Revenue as decimal string"
          },
          "revenue_atomic": {
            "type": "integer",
            "format": "int64",
            "description": "Revenue on this day (atomic units)"
          },
          "unique_agents": {
            "type": "integer",
            "format": "int64",
            "description": "Number of unique agents on this day"
          }
        }
      },
      "RevenueMetrics": {
        "type": "object",
        "description": "Revenue metrics with period-over-period comparison.",
        "required": [
          "total_revenue_atomic",
          "total_revenue",
          "active_agents",
          "total_queries",
          "avg_query_cost_atomic",
          "revenue_change_pct",
          "agents_change_pct",
          "queries_change_pct",
          "period_start",
          "period_end"
        ],
        "properties": {
          "active_agents": {
            "type": "integer",
            "format": "int64",
            "description": "Number of active agents in the period"
          },
          "agents_change_pct": {
            "type": "integer",
            "format": "int32",
            "description": "Agent count change from previous period (percentage)"
          },
          "avg_query_cost_atomic": {
            "type": "integer",
            "format": "int64",
            "description": "Average query cost (atomic units)"
          },
          "period_end": {
            "type": "string",
            "description": "Period end date (ISO 8601)"
          },
          "period_start": {
            "type": "string",
            "description": "Period start date (ISO 8601)"
          },
          "queries_change_pct": {
            "type": "integer",
            "format": "int32",
            "description": "Query count change from previous period (percentage)"
          },
          "revenue_change_pct": {
            "type": "integer",
            "format": "int32",
            "description": "Revenue change from previous period (percentage, e.g., 15 = +15%)"
          },
          "total_queries": {
            "type": "integer",
            "format": "int64",
            "description": "Total queries executed in the period"
          },
          "total_revenue": {
            "type": "string",
            "description": "Total revenue as decimal string"
          },
          "total_revenue_atomic": {
            "type": "integer",
            "format": "int64",
            "description": "Total revenue in the period (atomic units)"
          }
        }
      },
      "RevokeResponse": {
        "type": "object",
        "required": [
          "success",
          "message"
        ],
        "properties": {
          "message": {
            "type": "string"
          },
          "success": {
            "type": "boolean"
          }
        }
      },
      "Session": {
        "type": "object",
        "description": "Response for listing user sessions (hides sensitive token hash)",
        "required": [
          "id",
          "last_active_at",
          "created_at",
          "expires_at",
          "is_current"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "ip_address": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_current": {
            "type": "boolean"
          },
          "last_active_at": {
            "type": "string",
            "format": "date-time"
          },
          "user_agent": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "SessionsRevoked": {
        "type": "object",
        "required": [
          "message",
          "revoked_count"
        ],
        "properties": {
          "message": {
            "type": "string"
          },
          "revoked_count": {
            "type": "integer",
            "format": "int64",
            "minimum": 0
          }
        }
      },
      "SetRecoveryRequest": {
        "type": "object",
        "description": "Request to set up account recovery",
        "properties": {
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "Email address for account recovery (optional, for human contact)"
          }
        }
      },
      "SetupInstructions": {
        "type": "object",
        "description": "Setup instructions for new agents",
        "required": [
          "step_1",
          "step_2",
          "step_3",
          "step_4"
        ],
        "properties": {
          "step_1": {
            "type": "string",
            "description": "Step 1: Save your API key"
          },
          "step_2": {
            "type": "string",
            "description": "Step 2: Set up authentication header"
          },
          "step_3": {
            "type": "string",
            "description": "Step 3: Browse publishers"
          },
          "step_4": {
            "$ref": "#/components/schemas/PublisherTypeInstructions",
            "description": "Step 4: Use publishers by type"
          }
        }
      },
      "SkillFiles": {
        "type": "object",
        "description": "Skill files and documentation links",
        "required": [
          "skill_md",
          "docs"
        ],
        "properties": {
          "docs": {
            "type": "string",
            "description": "Link to the documentation"
          },
          "skill_md": {
            "type": "string",
            "description": "Link to the main skill.md file"
          }
        }
      },
      "SlashChargeRequest": {
        "type": "object",
        "required": [
          "slash_amount_atomic",
          "reason"
        ],
        "properties": {
          "reason": {
            "type": "string"
          },
          "slash_amount_atomic": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "Slug": {
        "type": "string",
        "description": "A validated URL-safe slug.\n\nSlugs must be:\n- 2-64 characters long\n- Lowercase alphanumeric with hyphens\n- Cannot start or end with a hyphen\n- Cannot have consecutive hyphens\n\n# Examples\n\n```\nuse seren_core::models::Slug;\n\nlet slug = Slug::new(\"my-project\").unwrap();\nassert!(Slug::new(\"My Project\").is_err()); // spaces not allowed\nassert!(Slug::new(\"-invalid\").is_err()); // can't start with hyphen\n```",
        "example": "my-project"
      },
      "StripeChargeId": {
        "type": "string",
        "description": "A Stripe Charge ID (ch_xxx).",
        "example": "ch_1234567890abcdef"
      },
      "StripePaymentIntentId": {
        "type": "string",
        "description": "A Stripe Payment Intent ID (pi_xxx).",
        "example": "pi_1234567890abcdef"
      },
      "StripePaymentMethodId": {
        "type": "string",
        "description": "A Stripe Payment Method ID (pm_xxx).",
        "example": "pm_1234567890abcdef"
      },
      "SuggestResponse": {
        "type": "object",
        "description": "Response for suggest endpoint\nReturns publisher and agent recommendations based on task/query matching",
        "required": [
          "publishers",
          "agents"
        ],
        "properties": {
          "agents": {
            "type": "array",
            "items": {},
            "description": "Matched agents sorted by relevance (agent templates coming soon)"
          },
          "publishers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/PublisherSuggestion"
            },
            "description": "Matched publishers sorted by relevance"
          }
        }
      },
      "SupportedKind": {
        "type": "object",
        "description": "Supported payment kind (from facilitator /supported endpoint)",
        "required": [
          "x402Version",
          "scheme",
          "network"
        ],
        "properties": {
          "extra": {
            "description": "Extra scheme-specific info"
          },
          "network": {
            "type": "string",
            "description": "Network in CAIP-2 format"
          },
          "scheme": {
            "type": "string",
            "description": "Payment scheme"
          },
          "x402Version": {
            "type": "integer",
            "format": "int32",
            "description": "x402 protocol version",
            "minimum": 0
          }
        }
      },
      "SupportedResponse": {
        "type": "object",
        "description": "Response from facilitator /supported endpoint",
        "required": [
          "kinds"
        ],
        "properties": {
          "extensions": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "List of supported extensions"
          },
          "kinds": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SupportedKind"
            },
            "description": "List of supported payment kinds"
          },
          "signers": {
            "description": "Signer addresses by network family"
          }
        }
      },
      "TaskType": {
        "type": "string",
        "enum": [
          "code_generation",
          "file_operations",
          "research",
          "document_generation",
          "general_chat"
        ]
      },
      "TemplateAnalytics": {
        "type": "object",
        "description": "Analytics data for a single template",
        "required": [
          "template_id",
          "slug",
          "name",
          "total_invocations",
          "successful_invocations",
          "failed_invocations",
          "success_rate",
          "unique_agents_served",
          "total_revenue_atomic",
          "total_revenue_usd"
        ],
        "properties": {
          "avg_execution_time_ms": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "failed_invocations": {
            "type": "integer",
            "format": "int64"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string"
          },
          "success_rate": {
            "type": "number",
            "format": "double"
          },
          "successful_invocations": {
            "type": "integer",
            "format": "int64"
          },
          "template_id": {
            "type": "string",
            "format": "uuid"
          },
          "total_invocations": {
            "type": "integer",
            "format": "int64"
          },
          "total_revenue_atomic": {
            "type": "integer",
            "format": "int64"
          },
          "total_revenue_usd": {
            "type": "string"
          },
          "unique_agents_served": {
            "type": "integer",
            "format": "int64"
          }
        }
      },
      "TemplateLanguage": {
        "type": "string",
        "enum": [
          "python",
          "typescript",
          "javascript"
        ]
      },
      "TemplateSetting": {
        "type": "object",
        "description": "A publisher-defined user-configurable setting on a template.",
        "required": [
          "key",
          "label",
          "settingType",
          "required"
        ],
        "properties": {
          "default": {
            "description": "Default value (must match setting_type)"
          },
          "key": {
            "type": "string",
            "description": "Machine-readable key (e.g., \"output_format\")"
          },
          "label": {
            "type": "string",
            "description": "Human-readable label (e.g., \"Output Format\")"
          },
          "required": {
            "type": "boolean",
            "description": "Whether the setting must be provided at invocation time"
          },
          "settingType": {
            "$ref": "#/components/schemas/TemplateSettingType",
            "description": "Type of the setting"
          }
        }
      },
      "TemplateSettingType": {
        "oneOf": [
          {
            "type": "string",
            "description": "Free-form text input",
            "enum": [
              "text"
            ]
          },
          {
            "type": "string",
            "description": "Boolean toggle",
            "enum": [
              "toggle"
            ]
          },
          {
            "type": "object",
            "description": "Selection from a fixed set of options",
            "required": [
              "select"
            ],
            "properties": {
              "select": {
                "type": "object",
                "description": "Selection from a fixed set of options",
                "required": [
                  "options"
                ],
                "properties": {
                  "options": {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        ],
        "description": "Types of user-configurable template settings."
      },
      "TemplateSortBy": {
        "type": "string",
        "description": "Sorting options for template catalog",
        "enum": [
          "popularity",
          "price_asc",
          "price_desc",
          "newest",
          "oldest"
        ]
      },
      "TokenCount": {
        "type": "object",
        "properties": {
          "input": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "output": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          }
        }
      },
      "TokenEndpointAuthMethod": {
        "type": "string",
        "enum": [
          "client_secret_post",
          "client_secret_basic"
        ]
      },
      "TopAgent": {
        "type": "object",
        "description": "Top agent by spending.",
        "required": [
          "rank",
          "agent_wallet",
          "total_spent_atomic",
          "total_spent",
          "balance_atomic",
          "query_count"
        ],
        "properties": {
          "agent_wallet": {
            "type": "string",
            "description": "Agent wallet address"
          },
          "balance_atomic": {
            "type": "integer",
            "format": "int64",
            "description": "Current balance (atomic units)"
          },
          "last_active": {
            "type": [
              "string",
              "null"
            ],
            "description": "Last activity timestamp (ISO 8601)"
          },
          "query_count": {
            "type": "integer",
            "format": "int64",
            "description": "Number of queries executed"
          },
          "rank": {
            "type": "integer",
            "format": "int32",
            "description": "Rank (1 = highest spender)"
          },
          "total_spent": {
            "type": "string",
            "description": "Total amount spent as decimal string"
          },
          "total_spent_atomic": {
            "type": "integer",
            "format": "int64",
            "description": "Total amount spent (atomic units)"
          }
        }
      },
      "TransactionSummaryResponse": {
        "type": "object",
        "description": "Summary statistics for transactions in a date range",
        "required": [
          "starting_balance_atomic",
          "starting_balance_usd",
          "total_credits_atomic",
          "total_credits_usd",
          "total_debits_atomic",
          "total_debits_usd",
          "net_change_atomic",
          "net_change_usd",
          "ending_balance_atomic",
          "ending_balance_usd",
          "transaction_count"
        ],
        "properties": {
          "ending_balance_atomic": {
            "type": "integer",
            "format": "int64",
            "description": "Wallet balance at the end of the selected period"
          },
          "ending_balance_usd": {
            "type": "string"
          },
          "net_change_atomic": {
            "type": "integer",
            "format": "int64",
            "description": "Net change (credits - debits, can be negative)"
          },
          "net_change_usd": {
            "type": "string"
          },
          "period_end": {
            "type": [
              "string",
              "null"
            ]
          },
          "period_start": {
            "type": [
              "string",
              "null"
            ]
          },
          "starting_balance_atomic": {
            "type": "integer",
            "format": "int64",
            "description": "Wallet balance immediately before the period start"
          },
          "starting_balance_usd": {
            "type": "string"
          },
          "total_credits_atomic": {
            "type": "integer",
            "format": "int64",
            "description": "Total credits received in the period (positive)"
          },
          "total_credits_usd": {
            "type": "string"
          },
          "total_debits_atomic": {
            "type": "integer",
            "format": "int64",
            "description": "Total debits spent in the period (positive number representing absolute spend)"
          },
          "total_debits_usd": {
            "type": "string"
          },
          "transaction_count": {
            "type": "integer",
            "format": "int64",
            "description": "Total number of transactions in the period"
          }
        }
      },
      "TypedParam": {
        "type": "object",
        "description": "Single typed parameter definition",
        "required": [
          "name",
          "type"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string"
          }
        }
      },
      "UndocumentedEndpointPolicy": {
        "type": "string",
        "description": "Policy for handling requests to paths not in the endpoints catalog",
        "enum": [
          "default_allow",
          "default_deny"
        ]
      },
      "UpdateOAuthProviderRequest": {
        "type": "object",
        "description": "Request to update an OAuth provider (admin only).\n\nFields use `Option<Option<T>>` where `null` explicitly clears the value.",
        "properties": {
          "authorization_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "client_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "client_secret": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional new client secret (will be re-encrypted). If omitted, keep existing."
          },
          "custom_auth_params": {
            "description": "Custom provider-specific authorization URL parameters. If omitted, leave unchanged."
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "If omitted, leave unchanged. If null, clear."
          },
          "is_active": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "logo_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "If omitted, leave unchanged. If null, clear."
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "organization_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "If omitted, leave unchanged. If null, make global. If set, scope to organization."
          },
          "pkce_required": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "revocation_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "If omitted, leave unchanged. If null, clear."
          },
          "scopes": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "slug": {
            "type": [
              "string",
              "null"
            ]
          },
          "token_endpoint_auth_method": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/TokenEndpointAuthMethod"
              }
            ]
          },
          "token_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "userinfo_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "If omitted, leave unchanged. If null, clear."
          }
        }
      },
      "UpdatePricingRequest": {
        "type": "object",
        "description": "Request to update pricing config",
        "required": [
          "asset_id"
        ],
        "properties": {
          "asset_id": {
            "type": "string",
            "format": "uuid",
            "description": "Asset ID for this pricing config (required)"
          },
          "base_price_per_1000_rows": {
            "type": [
              "string",
              "null"
            ]
          },
          "grace_period_minutes": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "hourly_rate": {
            "type": [
              "string",
              "null"
            ]
          },
          "low_balance_threshold": {
            "type": [
              "string",
              "null"
            ]
          },
          "markup_multiplier": {
            "type": [
              "string",
              "null"
            ]
          },
          "max_queries_per_minute": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "min_charge": {
            "type": [
              "string",
              "null"
            ]
          },
          "min_display_price": {
            "type": [
              "string",
              "null"
            ],
            "description": "Minimum price to display in UI for passthrough publishers (informational only)"
          },
          "minimum_balance": {
            "type": [
              "string",
              "null"
            ]
          },
          "onchain_enabled": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "payment_expiry_minutes": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "prepaid_enabled": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "price_per_call": {
            "type": [
              "string",
              "null"
            ]
          },
          "price_per_delete": {
            "type": [
              "string",
              "null"
            ]
          },
          "price_per_execution": {
            "type": [
              "string",
              "null"
            ],
            "description": "Price per execution for agent templates or usage-based billing"
          },
          "price_per_get": {
            "type": [
              "string",
              "null"
            ]
          },
          "price_per_patch": {
            "type": [
              "string",
              "null"
            ]
          },
          "price_per_post": {
            "type": [
              "string",
              "null"
            ]
          },
          "price_per_put": {
            "type": [
              "string",
              "null"
            ]
          },
          "pricing_display_text": {
            "type": [
              "string",
              "null"
            ],
            "description": "Text to display for variable pricing (e.g., \"Varies by model\")"
          },
          "pricing_model": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PricingModel"
              }
            ]
          },
          "reserve_max_charge": {
            "type": [
              "string",
              "null"
            ]
          },
          "token_cache_ttl_seconds": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "TTL for cached exchanged tokens in seconds (60-86400)"
          },
          "token_exchange_method": {
            "type": [
              "string",
              "null"
            ],
            "description": "HTTP method for exchange endpoint (POST or GET)"
          },
          "token_exchange_mode": {
            "type": [
              "string",
              "null"
            ],
            "description": "How to send Seren token: header, body, or query"
          },
          "token_exchange_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL to call for exchanging Seren API keys for publisher auth tokens"
          },
          "token_response_field": {
            "type": [
              "string",
              "null"
            ],
            "description": "JSON field in exchange response containing the token"
          },
          "unresolved_fallback_charge": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpdatePublisherRequest": {
        "type": "object",
        "description": "Request to update a publisher",
        "properties": {
          "a2a_endpoint_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "A2A endpoint base URL (for compute_type = agent)"
          },
          "add_asset_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Asset IDs to add to accepted assets"
          },
          "allowed_passthrough_headers": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Whitelist of agent-provided headers allowed to pass through to upstream"
          },
          "api_headers": {
            "description": "Headers for API requests (will be encrypted)"
          },
          "api_key_header": {
            "type": [
              "string",
              "null"
            ],
            "description": "Header name to inject upstream_api_key into (e.g., \"Authorization\", \"X-API-Key\")"
          },
          "api_key_query_param": {
            "type": [
              "string",
              "null"
            ],
            "description": "Query parameter name to inject upstream_api_key into (e.g., \"api_key\")"
          },
          "api_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "External API URL (for integration_type = api)"
          },
          "auth_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "Upstream auth mode (\"static\" or \"jwt\")"
          },
          "base_price_per_1000_rows": {
            "type": [
              "string",
              "null"
            ]
          },
          "billing_model": {
            "type": [
              "string",
              "null"
            ],
            "description": "Billing model (\"x402_per_request\", \"prepaid_credits\", \"x402_passthrough\", \"pay_per_use\")"
          },
          "branch_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "SerenDB branch ID (for database_type = serendb)"
          },
          "capabilities": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Publisher-declared capabilities for task matching (e.g., \"web_scraping\", \"ai_search\")"
          },
          "categories": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "compute_type": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/ComputeType",
                "description": "Compute type when publisher_category = compute"
              }
            ]
          },
          "database_config": {
            "description": "Provider-specific configuration"
          },
          "database_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Database name within the SerenDB project"
          },
          "database_type": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/DatabaseType",
                "description": "Database type when publisher_category = database"
              }
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "description": "Publisher contact email for notifications and support"
          },
          "endpoints": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/EndpointDefinition"
            },
            "description": "Structured endpoint definitions for LLM discoverability and access control"
          },
          "gateway_fee_percent": {
            "type": [
              "string",
              "null"
            ],
            "description": "Gateway fee percentage for upstream x402 payments (pass-through)."
          },
          "grace_period_minutes": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "hourly_rate": {
            "type": [
              "string",
              "null"
            ]
          },
          "integration_type": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/IntegrationType",
                "description": "Integration type when publisher_category = integration"
              }
            ]
          },
          "is_active": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "jwt_access_key": {
            "type": [
              "string",
              "null"
            ],
            "description": "JWT access key / issuer claim (plaintext)"
          },
          "jwt_algorithm": {
            "type": [
              "string",
              "null"
            ],
            "description": "JWT signing algorithm (\"HS256\", \"HS384\", \"HS512\")"
          },
          "jwt_expiration_seconds": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "JWT expiration seconds"
          },
          "jwt_secret_key": {
            "type": [
              "string",
              "null"
            ],
            "description": "JWT secret key (will be encrypted)"
          },
          "logo_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional publisher branding URL"
          },
          "low_balance_threshold": {
            "type": [
              "string",
              "null"
            ]
          },
          "markup_multiplier": {
            "type": [
              "string",
              "null"
            ]
          },
          "mcp_endpoint": {
            "type": [
              "string",
              "null"
            ],
            "description": "MCP server endpoint URL (for integration_type = mcp)"
          },
          "minimum_balance": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "oauth2_client_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "OAuth2 client ID for Client Credentials flow"
          },
          "oauth2_client_secret": {
            "type": [
              "string",
              "null"
            ],
            "description": "OAuth2 client secret for Client Credentials flow (will be encrypted)"
          },
          "oauth2_scopes": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "OAuth2 scopes to request during Client Credentials flow"
          },
          "oauth2_token_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "OAuth2 token endpoint URL for Client Credentials flow"
          },
          "oauth_provider_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "OAuth provider ID for BYOC (Bring Your Own Credentials) authentication.\nSet to enable user-specific OAuth tokens for this publisher."
          },
          "ownership_tracking_enabled": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "Enable resource ownership tracking (legacy gateway parity)"
          },
          "price_per_call": {
            "type": [
              "string",
              "null"
            ]
          },
          "price_per_delete": {
            "type": [
              "string",
              "null"
            ]
          },
          "price_per_execution": {
            "type": [
              "string",
              "null"
            ],
            "description": "Price per execution for agent templates or usage-based billing"
          },
          "price_per_get": {
            "type": [
              "string",
              "null"
            ]
          },
          "price_per_patch": {
            "type": [
              "string",
              "null"
            ]
          },
          "price_per_post": {
            "type": [
              "string",
              "null"
            ]
          },
          "price_per_put": {
            "type": [
              "string",
              "null"
            ]
          },
          "project_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "SerenDB project ID (for database_type = serendb)"
          },
          "protected_operations": {
            "description": "Protected operations configuration - legacy, use endpoints[].is_protected instead"
          },
          "publisher_category": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/PublisherCategory",
                "description": "Publisher category: database, integration, or compute\nNote: Changing category is a significant change and requires corresponding type field"
              }
            ]
          },
          "remove_asset_ids": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Asset IDs to remove from accepted assets"
          },
          "request_content_type": {
            "type": [
              "string",
              "null"
            ],
            "description": "Content-Type for upstream API requests (default: application/json)"
          },
          "requires_user_oauth": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "If true, users must connect via OAuth before using this publisher (BYOC mode).\nRequires oauth_provider_id to be set."
          },
          "reserve_max_charge": {
            "type": [
              "string",
              "null"
            ],
            "description": "Maximum amount to reserve up-front for pay_per_use pre-authorization."
          },
          "resource_description": {
            "type": [
              "string",
              "null"
            ]
          },
          "resource_id_response_path": {
            "type": [
              "string",
              "null"
            ],
            "description": "JSONPath to resource ID in response body (for ownership tracking)"
          },
          "resource_id_url_pattern": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL pattern with :resourceId placeholder (for ownership tracking)"
          },
          "resource_name": {
            "type": [
              "string",
              "null"
            ]
          },
          "routing": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/GeoRoutingConfig",
                "description": "Geographic routing configuration for geo-restricted upstream APIs"
              }
            ]
          },
          "token_cache_ttl_seconds": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32",
            "description": "TTL for cached exchanged tokens in seconds (60-86400)"
          },
          "token_exchange_method": {
            "type": [
              "string",
              "null"
            ],
            "description": "HTTP method for exchange endpoint (POST or GET)"
          },
          "token_exchange_mode": {
            "type": [
              "string",
              "null"
            ],
            "description": "How to send Seren token: header, body, or query"
          },
          "token_exchange_url": {
            "type": [
              "string",
              "null"
            ],
            "description": "URL to call for exchanging Seren API keys for publisher auth tokens"
          },
          "token_response_field": {
            "type": [
              "string",
              "null"
            ],
            "description": "JSON field in exchange response containing the token (default: access_token)"
          },
          "undocumented_endpoint_policy": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/UndocumentedEndpointPolicy",
                "description": "Policy for handling requests to paths not in the endpoints catalog (\"allow\" or \"block\")"
              }
            ]
          },
          "unresolved_fallback_charge": {
            "type": [
              "string",
              "null"
            ],
            "description": "Fallback charge used when pay_per_use cost cannot be resolved from upstream response or token estimates."
          },
          "upstream_api_key": {
            "type": [
              "string",
              "null"
            ],
            "description": "Upstream static API key (will be encrypted)"
          },
          "upstream_cost_response_path": {
            "type": [
              "string",
              "null"
            ],
            "description": "Dot-separated path to upstream cost in response body (for pay_per_use and prepaid passthrough billing).\nExample: \"usage.cost\""
          },
          "upstream_headers": {
            "description": "Non-sensitive headers to send to upstream API (e.g., User-Agent)"
          },
          "usage_examples": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "$ref": "#/components/schemas/UsageExample"
            },
            "description": "Usage examples showing how to call the publisher's API"
          },
          "use_cases": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            },
            "description": "Human-readable use case descriptions (e.g., \"Scrape dynamic JavaScript websites\")"
          },
          "wallet_address": {
            "oneOf": [
              {
                "type": "null"
              },
              {
                "$ref": "#/components/schemas/WalletAddress",
                "description": "New wallet address for receiving payments"
              }
            ]
          },
          "wallet_network_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Network ID for wallet (must be provided if changing wallet_address)"
          }
        }
      },
      "UpdateRoleRequest": {
        "type": "object",
        "description": "Request to update a role",
        "properties": {
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "permissions": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          }
        }
      },
      "UpdateWebhookRequest": {
        "type": "object",
        "description": "Request to update a webhook",
        "properties": {
          "enabled": {
            "type": [
              "boolean",
              "null"
            ]
          },
          "events": {
            "type": [
              "array",
              "null"
            ],
            "items": {
              "type": "string"
            }
          },
          "name": {
            "type": [
              "string",
              "null"
            ]
          },
          "url": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "UpsertFederatedResourceRequest": {
        "type": "object",
        "description": "Request to upsert a federated resource",
        "required": [
          "resource_type",
          "external_id",
          "metadata"
        ],
        "properties": {
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "Optional expiration timestamp"
          },
          "external_id": {
            "type": "string",
            "description": "External ID of the resource (unique within publisher + type)"
          },
          "metadata": {
            "description": "Resource metadata (JSON object with type-specific fields)"
          },
          "org_database_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Optional database ID where the resource data lives"
          },
          "publisher_slug": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional publisher slug for disambiguation when an organization owns multiple publishers"
          },
          "resource_type": {
            "type": "string",
            "description": "Type of resource being registered"
          },
          "status": {
            "type": "string",
            "description": "Resource status (default: \"active\")"
          }
        }
      },
      "UsageEventDebugRecord": {
        "type": "object",
        "description": "Debug view: usage_events entry for an endpoint",
        "required": [
          "event_type",
          "quantity",
          "unit",
          "metadata",
          "event_timestamp"
        ],
        "properties": {
          "event_timestamp": {
            "type": "string"
          },
          "event_type": {
            "type": "string"
          },
          "metadata": {
            "type": "string"
          },
          "quantity": {
            "type": "number",
            "format": "double"
          },
          "unit": {
            "type": "string"
          }
        }
      },
      "UsageExample": {
        "type": "object",
        "description": "A single usage example showing how to call a publisher's API",
        "properties": {
          "curl": {
            "type": [
              "string",
              "null"
            ],
            "description": "Full curl command example"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Description of what this example demonstrates"
          },
          "title": {
            "type": [
              "string",
              "null"
            ],
            "description": "Short title for the example (e.g., \"Create a collection\")"
          }
        }
      },
      "UsageSummary": {
        "type": "object",
        "description": "Usage summary for billing period",
        "required": [
          "organization_id",
          "project_id",
          "project_name",
          "project_region",
          "period_start",
          "period_end",
          "compute_hours_small",
          "compute_hours_medium",
          "compute_hours_large",
          "compute_hours_xlarge",
          "storage_gb_avg",
          "pitr_gb_avg",
          "compute_cost_usd",
          "storage_cost_usd",
          "total_cost_usd"
        ],
        "properties": {
          "compute_cost_usd": {
            "type": "string"
          },
          "compute_hours_large": {
            "type": "number",
            "format": "double"
          },
          "compute_hours_medium": {
            "type": "number",
            "format": "double"
          },
          "compute_hours_small": {
            "type": "number",
            "format": "double"
          },
          "compute_hours_xlarge": {
            "type": "number",
            "format": "double"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "period_end": {
            "type": "string"
          },
          "period_start": {
            "type": "string"
          },
          "pitr_gb_avg": {
            "type": "number",
            "format": "double"
          },
          "project_id": {
            "type": "string",
            "format": "uuid"
          },
          "project_name": {
            "type": "string",
            "description": "Human-readable project name (denormalized for convenience)."
          },
          "project_region": {
            "type": "string",
            "description": "Cloud region for the project (e.g., aws-us-east-1)."
          },
          "storage_cost_usd": {
            "type": "string"
          },
          "storage_gb_avg": {
            "type": "number",
            "format": "double"
          },
          "total_cost_usd": {
            "type": "string"
          }
        }
      },
      "UserInfo": {
        "type": "object",
        "description": "Combined user view for API responses",
        "required": [
          "id",
          "email",
          "name",
          "status",
          "created_at"
        ],
        "properties": {
          "avatar_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "email": {
            "$ref": "#/components/schemas/Email"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "status": {
            "$ref": "#/components/schemas/UserStatus"
          }
        }
      },
      "UserMe": {
        "allOf": [
          {
            "$ref": "#/components/schemas/UserInfo"
          },
          {
            "type": "object",
            "required": [
              "default_organization_id"
            ],
            "properties": {
              "default_organization_id": {
                "type": "string",
                "format": "uuid",
                "description": "The user's default organization ID for API calls requiring an organization context.\nThis is typically the first organization the user joined (their personal org)."
              }
            }
          }
        ],
        "description": "Response for GET /auth/me - current user info with default organization"
      },
      "UserOAuthConnectionResponse": {
        "type": "object",
        "description": "Response type for user OAuth connection (excludes tokens)",
        "required": [
          "id",
          "provider_id",
          "provider_slug",
          "provider_name",
          "scopes",
          "is_valid",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "is_valid": {
            "type": "boolean"
          },
          "last_used_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "provider_email": {
            "type": [
              "string",
              "null"
            ]
          },
          "provider_id": {
            "type": "string",
            "format": "uuid"
          },
          "provider_logo_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "provider_name": {
            "type": "string"
          },
          "provider_slug": {
            "type": "string"
          },
          "provider_user_id": {
            "type": [
              "string",
              "null"
            ]
          },
          "scopes": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      },
      "UserStatus": {
        "type": "string",
        "description": "User status enum matching PostgreSQL enum",
        "enum": [
          "active",
          "deleted",
          "disabled",
          "paused"
        ]
      },
      "VerificationSent": {
        "type": "object",
        "required": [
          "message"
        ],
        "properties": {
          "message": {
            "type": "string"
          }
        }
      },
      "VerifyEmailRequest": {
        "type": "object",
        "required": [
          "token"
        ],
        "properties": {
          "token": {
            "type": "string"
          }
        }
      },
      "WalletAddress": {
        "type": "string",
        "description": "A validated wallet address (EVM or Solana).\n\nThis type ensures wallet addresses are validated at construction time.\nStored as TEXT in the database via SQLx's transparent encoding.\n\n# Examples\n\n```\nuse seren_core::models::WalletAddress;\n\n// EVM address\nlet evm = WalletAddress::new(\"0x1234567890123456789012345678901234567890\").unwrap();\n\n// Solana address\nlet sol = WalletAddress::new(\"EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v\").unwrap();\n\n// Convert to alloy Address for EVM operations\nif let Some(addr) = evm.as_evm() {\n    // Use with alloy...\n}\n```",
        "example": "0x1234567890123456789012345678901234567890"
      },
      "WalletBalanceKind": {
        "type": "string",
        "enum": [
          "funded",
          "promotional"
        ]
      },
      "WalletBalanceResponse": {
        "type": "object",
        "description": "Wallet balance response (funded + promotional)",
        "required": [
          "wallet_address",
          "balance_atomic",
          "balance_usd",
          "funded_balance_atomic",
          "funded_balance_usd",
          "promotional_balance_atomic",
          "promotional_balance_usd",
          "by_source",
          "total_purchases_cents",
          "total_purchases_usd",
          "has_recovery"
        ],
        "properties": {
          "balance_atomic": {
            "type": "integer",
            "format": "int64",
            "description": "Total wallet balance in atomic units"
          },
          "balance_usd": {
            "type": "string"
          },
          "by_source": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WalletSourceBalance"
            },
            "description": "Breakdown by source"
          },
          "funded_balance_atomic": {
            "type": "integer",
            "format": "int64",
            "description": "Total funded balance (fiat purchases + tier bonuses)"
          },
          "funded_balance_usd": {
            "type": "string"
          },
          "has_recovery": {
            "type": "boolean",
            "description": "Whether recovery is set up for this account"
          },
          "promotional_balance_atomic": {
            "type": "integer",
            "format": "int64",
            "description": "Total promotional balance (bonuses, daily claims, referrals, admin grants)"
          },
          "promotional_balance_usd": {
            "type": "string"
          },
          "recovery_warning": {
            "type": [
              "string",
              "null"
            ],
            "description": "Warning if funds exist but no recovery is set up"
          },
          "total_purchases_cents": {
            "type": "integer",
            "format": "int64",
            "description": "Total lifetime SerenBucks purchases in cents (for plan upgrade tracking)"
          },
          "total_purchases_usd": {
            "type": "string"
          },
          "wallet_address": {
            "type": "string"
          }
        }
      },
      "WalletRecoverRequest": {
        "type": "object",
        "description": "Request to recover an agent account using a recovery code.\n\nUse this endpoint when you've lost access to your API key but still have\nyour recovery code (provided when setting up wallet recovery).",
        "required": [
          "recovery_code"
        ],
        "properties": {
          "recovery_code": {
            "type": "string",
            "description": "Recovery code (24 characters). Dashes/whitespace are allowed; letters are case-insensitive."
          }
        }
      },
      "WalletRecoverResponse": {
        "type": "object",
        "description": "Response from wallet recovery endpoint.",
        "required": [
          "success",
          "message",
          "agent",
          "setup",
          "skill_files",
          "new_recovery_code"
        ],
        "properties": {
          "agent": {
            "$ref": "#/components/schemas/AgentInfo",
            "description": "The recovered agent account (with a new API key)"
          },
          "message": {
            "type": "string",
            "description": "Message about recovery result"
          },
          "new_recovery_code": {
            "type": "string",
            "description": "New recovery code (the old one has been rotated). Save this securely!"
          },
          "setup": {
            "$ref": "#/components/schemas/SetupInstructions",
            "description": "Setup instructions for getting started"
          },
          "skill_files": {
            "$ref": "#/components/schemas/SkillFiles",
            "description": "Links to skill files and documentation"
          },
          "success": {
            "type": "boolean",
            "description": "Whether recovery was successful"
          }
        }
      },
      "WalletSourceBalance": {
        "type": "object",
        "description": "Balance by source type",
        "required": [
          "source",
          "kind",
          "balance_atomic",
          "balance_usd"
        ],
        "properties": {
          "balance_atomic": {
            "type": "integer",
            "format": "int64"
          },
          "balance_usd": {
            "type": "string"
          },
          "kind": {
            "$ref": "#/components/schemas/WalletBalanceKind"
          },
          "source": {
            "$ref": "#/components/schemas/AgentCreditSource"
          }
        }
      },
      "WalletTransactionDirection": {
        "type": "string",
        "description": "Response for a single transaction",
        "enum": [
          "credit",
          "debit"
        ]
      },
      "WalletTransactionHistoryResponse": {
        "type": "object",
        "description": "Response for transaction history",
        "required": [
          "transactions",
          "total",
          "limit",
          "offset"
        ],
        "properties": {
          "limit": {
            "type": "integer",
            "format": "int64"
          },
          "offset": {
            "type": "integer",
            "format": "int64"
          },
          "total": {
            "type": "integer",
            "format": "int64"
          },
          "transactions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/WalletTransactionResponse"
            }
          }
        }
      },
      "WalletTransactionResponse": {
        "type": "object",
        "description": "Response for a single transaction",
        "required": [
          "id",
          "direction",
          "source",
          "amount_atomic",
          "amount_usd",
          "created_at"
        ],
        "properties": {
          "alert": {
            "type": [
              "string",
              "null"
            ],
            "description": "Optional alert string when the transaction appears anomalously expensive."
          },
          "amount_atomic": {
            "type": "integer",
            "format": "int64"
          },
          "amount_usd": {
            "type": "string"
          },
          "balance_after_atomic": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Wallet balance immediately after this debit (debit entries only)"
          },
          "balance_after_usd": {
            "type": [
              "string",
              "null"
            ],
            "description": "Wallet balance immediately after this debit in USD (debit entries only)"
          },
          "bonus_amount_usd": {
            "type": [
              "string",
              "null"
            ],
            "description": "Bonus amount included in this grant (only for tier_bonus source)"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "direction": {
            "$ref": "#/components/schemas/WalletTransactionDirection"
          },
          "expires_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "paid_amount_usd": {
            "type": [
              "string",
              "null"
            ],
            "description": "Original Stripe payment amount (only for fiat_purchase source)"
          },
          "prompt": {
            "type": [
              "string",
              "null"
            ],
            "description": "Prompt/query text associated with this transaction (when available)"
          },
          "publisher_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "description": "Publisher context for this transaction (when available)"
          },
          "publisher_name": {
            "type": [
              "string",
              "null"
            ],
            "description": "Publisher name (when available)"
          },
          "remaining_atomic": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int64",
            "description": "Remaining amount on the grant (credit entries only)"
          },
          "remaining_usd": {
            "type": [
              "string",
              "null"
            ],
            "description": "Remaining amount on the grant in USD (credit entries only)"
          },
          "source": {
            "type": "string"
          }
        }
      },
      "WebhookCreated": {
        "type": "object",
        "description": "Webhook created response (includes secret on creation only)",
        "required": [
          "webhook",
          "secret"
        ],
        "properties": {
          "secret": {
            "type": "string",
            "description": "The webhook secret - only shown once at creation time"
          },
          "webhook": {
            "$ref": "#/components/schemas/WebhookInfo"
          }
        }
      },
      "WebhookDelivery": {
        "type": "object",
        "description": "Webhook delivery record",
        "required": [
          "id",
          "webhook_id",
          "event_type",
          "event_id",
          "payload",
          "attempt_number",
          "created_at"
        ],
        "properties": {
          "attempt_number": {
            "type": "integer",
            "format": "int32"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "delivered_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "error_message": {
            "type": [
              "string",
              "null"
            ]
          },
          "event_id": {
            "type": "string",
            "format": "uuid"
          },
          "event_type": {
            "type": "string"
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "next_retry_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "payload": {
            "type": "object"
          },
          "response_body": {
            "type": [
              "string",
              "null"
            ]
          },
          "response_status": {
            "type": [
              "integer",
              "null"
            ],
            "format": "int32"
          },
          "webhook_id": {
            "type": "string",
            "format": "uuid"
          }
        }
      },
      "WebhookInfo": {
        "type": "object",
        "description": "Webhook response (hides secret)",
        "required": [
          "id",
          "organization_id",
          "name",
          "url",
          "events",
          "enabled",
          "created_by",
          "created_at"
        ],
        "properties": {
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "created_by": {
            "type": "string",
            "format": "uuid"
          },
          "enabled": {
            "type": "boolean"
          },
          "events": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string"
          },
          "organization_id": {
            "type": "string",
            "format": "uuid"
          },
          "project_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid"
          },
          "url": {
            "type": "string"
          }
        }
      }
    }
  },
  "tags": [
    {
      "name": "Databases",
      "description": "Database management endpoints"
    },
    {
      "name": "Geographic Routing",
      "description": "User opt-in for geographic proxy routing"
    },
    {
      "name": "Auth",
      "description": "Authentication and user management endpoints"
    },
    {
      "name": "OAuth",
      "description": "OAuth connections for BYOC integrations"
    },
    {
      "name": "oauth-providers",
      "description": "Organization OAuth provider configuration (BYOC)"
    },
    {
      "name": "Organizations",
      "description": "Organization management endpoints"
    },
    {
      "name": "VPC",
      "description": "VPC endpoint management"
    },
    {
      "name": "billing",
      "description": "Billing and metering endpoints (x402 token cache)"
    },
    {
      "name": "payments",
      "description": "Stripe payments and payment methods"
    },
    {
      "name": "Plans",
      "description": "Subscription plans and quota management"
    },
    {
      "name": "Audit Logs",
      "description": "Audit trail and activity logging"
    },
    {
      "name": "RBAC",
      "description": "Role-based access control and permissions"
    },
    {
      "name": "Webhooks",
      "description": "Webhook configuration and delivery management"
    },
    {
      "name": "Sessions",
      "description": "User session management"
    },
    {
      "name": "agent",
      "description": "Agent commerce and paid query execution"
    },
    {
      "name": "agent-internal",
      "description": "Agent internal endpoints for SerenDB proxy"
    },
    {
      "name": "agent-wallet",
      "description": "Wallet (funded + promotional)"
    },
    {
      "name": "publisher-payments",
      "description": "Publisher payment APIs for first-class services"
    },
    {
      "name": "publishers",
      "description": "Unified publisher proxy API"
    },
    {
      "name": "mcp",
      "description": "MCP (Model Context Protocol) publisher integration"
    },
    {
      "name": "skill",
      "description": "Endpoints included in skill.md for AI agent discovery"
    },
    {
      "name": "Eval",
      "description": "Eval signal ingestion and routing matrix"
    },
    {
      "name": "federation",
      "description": "Cross-publisher resource discovery and federation"
    }
  ]
}