{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/robosystems-ai/json-schema/robosystems-ai-detailed-transactions-response-schema.json",
  "title": "DetailedTransactionsResponse",
  "description": "Detailed response for transaction queries.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/robosystems-ai-credits-api-openapi.yml#/components/schemas/DetailedTransactionsResponse",
  "properties": {
    "transactions": {
      "items": {
        "$ref": "#/$defs/EnhancedCreditTransactionResponse"
      },
      "type": "array",
      "title": "Transactions"
    },
    "summary": {
      "additionalProperties": {
        "$ref": "#/$defs/TransactionSummaryResponse"
      },
      "type": "object",
      "title": "Summary"
    },
    "total_count": {
      "type": "integer",
      "title": "Total Count"
    },
    "filtered_count": {
      "type": "integer",
      "title": "Filtered Count"
    },
    "date_range": {
      "additionalProperties": {
        "type": "string"
      },
      "type": "object",
      "title": "Date Range"
    }
  },
  "type": "object",
  "required": [
    "transactions",
    "summary",
    "total_count",
    "filtered_count",
    "date_range"
  ],
  "$defs": {
    "EnhancedCreditTransactionResponse": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "type": {
          "type": "string",
          "title": "Type"
        },
        "amount": {
          "type": "number",
          "title": "Amount"
        },
        "description": {
          "type": "string",
          "title": "Description"
        },
        "metadata": {
          "additionalProperties": true,
          "type": "object",
          "title": "Metadata"
        },
        "created_at": {
          "type": "string",
          "title": "Created At"
        },
        "operation_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Operation Id"
        },
        "idempotency_key": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Idempotency Key"
        },
        "request_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Request Id"
        },
        "user_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "User Id"
        }
      },
      "type": "object",
      "required": [
        "id",
        "type",
        "amount",
        "description",
        "metadata",
        "created_at"
      ],
      "title": "EnhancedCreditTransactionResponse",
      "description": "Enhanced credit transaction response with more details."
    },
    "TransactionSummaryResponse": {
      "properties": {
        "operation_type": {
          "type": "string",
          "title": "Operation Type"
        },
        "total_amount": {
          "type": "number",
          "title": "Total Amount"
        },
        "transaction_count": {
          "type": "integer",
          "title": "Transaction Count"
        },
        "average_amount": {
          "type": "number",
          "title": "Average Amount"
        },
        "first_transaction": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "First Transaction"
        },
        "last_transaction": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Last Transaction"
        }
      },
      "type": "object",
      "required": [
        "operation_type",
        "total_amount",
        "transaction_count",
        "average_amount"
      ],
      "title": "TransactionSummaryResponse",
      "description": "Summary of transactions by operation type."
    }
  }
}