{
  "openapi": "3.0.4",
  "info": {
    "title": "XDPeople.Soba.Report.WebAPI",
    "version": "1.0"
  },
  "paths": {
    "/gateway/dynamic-chart-reports": {
      "get": {
        "tags": [
          "DynamicChartReports"
        ],
        "summary": "Gets all dynamic chart reports.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DynamicChartDataDTO"
                  }
                },
                "example": [
                  {
                    "guid": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
                    "name": "Vendas Mensal",
                    "description": "Gráfico de vendas mensais por categoria",
                    "addToRibbon": true,
                    "selectedDynamicReportGuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                    "permissionType": 0,
                    "userId": 1,
                    "permissionGroupsId": [
                      1,
                      3
                    ],
                    "settingsEntity": {
                      "chartTitle": "Vendas por Mês",
                      "argument": "Mes",
                      "selectedSeries": 9,
                      "selectedDiagram": 1,
                      "selectedPalette": 4,
                      "serieMember": "Categoria",
                      "value": "TotalVendas",
                      "animate": true,
                      "showLegend": true,
                      "showSeriesLegend": true
                    }
                  },
                  {
                    "guid": "c3d4e5f6-a7b8-9012-cdef-123456789012",
                    "name": "Top 10 Clientes",
                    "description": "Gráfico circular dos 10 maiores clientes por volume",
                    "addToRibbon": false,
                    "selectedDynamicReportGuid": "d4e5f6a7-b8c9-0123-defa-234567890123",
                    "permissionType": 2,
                    "userId": null,
                    "permissionGroupsId": [
                      1
                    ],
                    "settingsEntity": {
                      "chartTitle": "Top 10 Clientes",
                      "argument": "Cliente",
                      "selectedSeries": 0,
                      "selectedDiagram": 0,
                      "selectedPalette": 0,
                      "serieMember": "",
                      "value": "TotalVendas",
                      "animate": true,
                      "showLegend": true,
                      "showSeriesLegend": false
                    }
                  }
                ]
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DynamicChartDataDTO"
                  }
                },
                "example": [
                  {
                    "guid": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
                    "name": "Vendas Mensal",
                    "description": "Gráfico de vendas mensais por categoria",
                    "addToRibbon": true,
                    "selectedDynamicReportGuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                    "permissionType": 0,
                    "userId": 1,
                    "permissionGroupsId": [
                      1,
                      3
                    ],
                    "settingsEntity": {
                      "chartTitle": "Vendas por Mês",
                      "argument": "Mes",
                      "selectedSeries": 9,
                      "selectedDiagram": 1,
                      "selectedPalette": 4,
                      "serieMember": "Categoria",
                      "value": "TotalVendas",
                      "animate": true,
                      "showLegend": true,
                      "showSeriesLegend": true
                    }
                  },
                  {
                    "guid": "c3d4e5f6-a7b8-9012-cdef-123456789012",
                    "name": "Top 10 Clientes",
                    "description": "Gráfico circular dos 10 maiores clientes por volume",
                    "addToRibbon": false,
                    "selectedDynamicReportGuid": "d4e5f6a7-b8c9-0123-defa-234567890123",
                    "permissionType": 2,
                    "userId": null,
                    "permissionGroupsId": [
                      1
                    ],
                    "settingsEntity": {
                      "chartTitle": "Top 10 Clientes",
                      "argument": "Cliente",
                      "selectedSeries": 0,
                      "selectedDiagram": 0,
                      "selectedPalette": 0,
                      "serieMember": "",
                      "value": "TotalVendas",
                      "animate": true,
                      "showLegend": true,
                      "showSeriesLegend": false
                    }
                  }
                ]
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/DynamicChartDataDTO"
                  }
                },
                "example": [
                  {
                    "guid": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
                    "name": "Vendas Mensal",
                    "description": "Gráfico de vendas mensais por categoria",
                    "addToRibbon": true,
                    "selectedDynamicReportGuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                    "permissionType": 0,
                    "userId": 1,
                    "permissionGroupsId": [
                      1,
                      3
                    ],
                    "settingsEntity": {
                      "chartTitle": "Vendas por Mês",
                      "argument": "Mes",
                      "selectedSeries": 9,
                      "selectedDiagram": 1,
                      "selectedPalette": 4,
                      "serieMember": "Categoria",
                      "value": "TotalVendas",
                      "animate": true,
                      "showLegend": true,
                      "showSeriesLegend": true
                    }
                  },
                  {
                    "guid": "c3d4e5f6-a7b8-9012-cdef-123456789012",
                    "name": "Top 10 Clientes",
                    "description": "Gráfico circular dos 10 maiores clientes por volume",
                    "addToRibbon": false,
                    "selectedDynamicReportGuid": "d4e5f6a7-b8c9-0123-defa-234567890123",
                    "permissionType": 2,
                    "userId": null,
                    "permissionGroupsId": [
                      1
                    ],
                    "settingsEntity": {
                      "chartTitle": "Top 10 Clientes",
                      "argument": "Cliente",
                      "selectedSeries": 0,
                      "selectedDiagram": 0,
                      "selectedPalette": 0,
                      "serieMember": "",
                      "value": "TotalVendas",
                      "animate": true,
                      "showLegend": true,
                      "showSeriesLegend": false
                    }
                  }
                ]
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      },
      "post": {
        "tags": [
          "DynamicChartReports"
        ],
        "summary": "Creates a new dynamic chart report.",
        "requestBody": {
          "description": "Data of the dynamic chart report to be created.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DynamicChartDataDTO"
              },
              "example": {
                "guid": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
                "name": "Vendas Mensal",
                "description": "Gráfico de vendas mensais por categoria de produto",
                "addToRibbon": true,
                "selectedDynamicReportGuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                "permissionType": 0,
                "userId": 1,
                "permissionGroupsId": [
                  1,
                  3
                ],
                "settingsEntity": {
                  "chartTitle": "Vendas por Mês",
                  "argument": "Mes",
                  "selectedSeries": 9,
                  "selectedDiagram": 1,
                  "selectedPalette": 4,
                  "serieMember": "Categoria",
                  "value": "TotalVendas",
                  "animate": true,
                  "showLegend": true,
                  "showSeriesLegend": true
                }
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DynamicChartDataDTO"
              },
              "example": {
                "guid": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
                "name": "Vendas Mensal",
                "description": "Gráfico de vendas mensais por categoria de produto",
                "addToRibbon": true,
                "selectedDynamicReportGuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                "permissionType": 0,
                "userId": 1,
                "permissionGroupsId": [
                  1,
                  3
                ],
                "settingsEntity": {
                  "chartTitle": "Vendas por Mês",
                  "argument": "Mes",
                  "selectedSeries": 9,
                  "selectedDiagram": 1,
                  "selectedPalette": 4,
                  "serieMember": "Categoria",
                  "value": "TotalVendas",
                  "animate": true,
                  "showLegend": true,
                  "showSeriesLegend": true
                }
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DynamicChartDataDTO"
              },
              "example": {
                "guid": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
                "name": "Vendas Mensal",
                "description": "Gráfico de vendas mensais por categoria de produto",
                "addToRibbon": true,
                "selectedDynamicReportGuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                "permissionType": 0,
                "userId": 1,
                "permissionGroupsId": [
                  1,
                  3
                ],
                "settingsEntity": {
                  "chartTitle": "Vendas por Mês",
                  "argument": "Mes",
                  "selectedSeries": 9,
                  "selectedDiagram": 1,
                  "selectedPalette": 4,
                  "serieMember": "Categoria",
                  "value": "TotalVendas",
                  "animate": true,
                  "showLegend": true,
                  "showSeriesLegend": true
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      },
      "put": {
        "tags": [
          "DynamicChartReports"
        ],
        "summary": "Updates an existing dynamic chart report.",
        "requestBody": {
          "description": "Updated data of the dynamic chart report.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DynamicChartDataDTO"
              },
              "example": {
                "guid": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
                "name": "Vendas Mensal",
                "description": "Gráfico de vendas mensais por categoria de produto",
                "addToRibbon": true,
                "selectedDynamicReportGuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                "permissionType": 0,
                "userId": 1,
                "permissionGroupsId": [
                  1,
                  3
                ],
                "settingsEntity": {
                  "chartTitle": "Vendas por Mês",
                  "argument": "Mes",
                  "selectedSeries": 9,
                  "selectedDiagram": 1,
                  "selectedPalette": 4,
                  "serieMember": "Categoria",
                  "value": "TotalVendas",
                  "animate": true,
                  "showLegend": true,
                  "showSeriesLegend": true
                }
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DynamicChartDataDTO"
              },
              "example": {
                "guid": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
                "name": "Vendas Mensal",
                "description": "Gráfico de vendas mensais por categoria de produto",
                "addToRibbon": true,
                "selectedDynamicReportGuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                "permissionType": 0,
                "userId": 1,
                "permissionGroupsId": [
                  1,
                  3
                ],
                "settingsEntity": {
                  "chartTitle": "Vendas por Mês",
                  "argument": "Mes",
                  "selectedSeries": 9,
                  "selectedDiagram": 1,
                  "selectedPalette": 4,
                  "serieMember": "Categoria",
                  "value": "TotalVendas",
                  "animate": true,
                  "showLegend": true,
                  "showSeriesLegend": true
                }
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DynamicChartDataDTO"
              },
              "example": {
                "guid": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
                "name": "Vendas Mensal",
                "description": "Gráfico de vendas mensais por categoria de produto",
                "addToRibbon": true,
                "selectedDynamicReportGuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                "permissionType": 0,
                "userId": 1,
                "permissionGroupsId": [
                  1,
                  3
                ],
                "settingsEntity": {
                  "chartTitle": "Vendas por Mês",
                  "argument": "Mes",
                  "selectedSeries": 9,
                  "selectedDiagram": 1,
                  "selectedPalette": 4,
                  "serieMember": "Categoria",
                  "value": "TotalVendas",
                  "animate": true,
                  "showLegend": true,
                  "showSeriesLegend": true
                }
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/gateway/dynamic-chart-reports/{guid}": {
      "get": {
        "tags": [
          "DynamicChartReports"
        ],
        "summary": "Gets a dynamic chart report by its unique identifier.",
        "parameters": [
          {
            "name": "guid",
            "in": "path",
            "description": "Unique identifier (GUID) of the chart report.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DynamicChartDataDTO"
                },
                "example": {
                  "guid": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
                  "name": "Vendas Mensal",
                  "description": "Gráfico de vendas mensais por categoria de produto",
                  "addToRibbon": true,
                  "selectedDynamicReportGuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                  "permissionType": 0,
                  "userId": 1,
                  "permissionGroupsId": [
                    1,
                    3
                  ],
                  "settingsEntity": {
                    "chartTitle": "Vendas por Mês",
                    "argument": "Mes",
                    "selectedSeries": 9,
                    "selectedDiagram": 1,
                    "selectedPalette": 4,
                    "serieMember": "Categoria",
                    "value": "TotalVendas",
                    "animate": true,
                    "showLegend": true,
                    "showSeriesLegend": true
                  }
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DynamicChartDataDTO"
                },
                "example": {
                  "guid": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
                  "name": "Vendas Mensal",
                  "description": "Gráfico de vendas mensais por categoria de produto",
                  "addToRibbon": true,
                  "selectedDynamicReportGuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                  "permissionType": 0,
                  "userId": 1,
                  "permissionGroupsId": [
                    1,
                    3
                  ],
                  "settingsEntity": {
                    "chartTitle": "Vendas por Mês",
                    "argument": "Mes",
                    "selectedSeries": 9,
                    "selectedDiagram": 1,
                    "selectedPalette": 4,
                    "serieMember": "Categoria",
                    "value": "TotalVendas",
                    "animate": true,
                    "showLegend": true,
                    "showSeriesLegend": true
                  }
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DynamicChartDataDTO"
                },
                "example": {
                  "guid": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
                  "name": "Vendas Mensal",
                  "description": "Gráfico de vendas mensais por categoria de produto",
                  "addToRibbon": true,
                  "selectedDynamicReportGuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                  "permissionType": 0,
                  "userId": 1,
                  "permissionGroupsId": [
                    1,
                    3
                  ],
                  "settingsEntity": {
                    "chartTitle": "Vendas por Mês",
                    "argument": "Mes",
                    "selectedSeries": 9,
                    "selectedDiagram": 1,
                    "selectedPalette": 4,
                    "serieMember": "Categoria",
                    "value": "TotalVendas",
                    "animate": true,
                    "showLegend": true,
                    "showSeriesLegend": true
                  }
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      },
      "delete": {
        "tags": [
          "DynamicChartReports"
        ],
        "summary": "Deletes a dynamic chart report by its unique identifier.",
        "parameters": [
          {
            "name": "guid",
            "in": "path",
            "description": "Unique identifier (GUID) of the chart report to be deleted.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/gateway/dynamic-chart-reports/{guid}/config": {
      "get": {
        "tags": [
          "DynamicChartReports"
        ],
        "summary": "Gets the configuration of a dynamic chart report by its unique identifier.",
        "parameters": [
          {
            "name": "guid",
            "in": "path",
            "description": "Unique identifier (GUID) of the chart report.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DynamicChartConfig"
                },
                "example": {
                  "chartTitle": "Vendas por Mês",
                  "argument": "Mes",
                  "selectedSeries": 9,
                  "selectedDiagram": 1,
                  "selectedPalette": 4,
                  "serieMember": "Categoria",
                  "value": "TotalVendas",
                  "animate": true,
                  "showLegend": true,
                  "showSeriesLegend": true,
                  "dynamicReportGuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                  "parameters": [
                    {
                      "name": "@initialDate",
                      "caption": "Data Inicial",
                      "description": "Data de início",
                      "value": "2025-01-01",
                      "defaultValueType": 1,
                      "dateTimeFunctions": 0,
                      "type": "Date",
                      "viewType": 7,
                      "entityTypeValue": null,
                      "paramHolder": "@initialDate",
                      "required": true,
                      "filter": null,
                      "group": 0,
                      "valueList": null,
                      "isDisabled": false,
                      "isVisible": true,
                      "query": null,
                      "handleVisibleParams": null,
                      "handleIsDisabledParams": null
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DynamicChartConfig"
                },
                "example": {
                  "chartTitle": "Vendas por Mês",
                  "argument": "Mes",
                  "selectedSeries": 9,
                  "selectedDiagram": 1,
                  "selectedPalette": 4,
                  "serieMember": "Categoria",
                  "value": "TotalVendas",
                  "animate": true,
                  "showLegend": true,
                  "showSeriesLegend": true,
                  "dynamicReportGuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                  "parameters": [
                    {
                      "name": "@initialDate",
                      "caption": "Data Inicial",
                      "description": "Data de início",
                      "value": "2025-01-01",
                      "defaultValueType": 1,
                      "dateTimeFunctions": 0,
                      "type": "Date",
                      "viewType": 7,
                      "entityTypeValue": null,
                      "paramHolder": "@initialDate",
                      "required": true,
                      "filter": null,
                      "group": 0,
                      "valueList": null,
                      "isDisabled": false,
                      "isVisible": true,
                      "query": null,
                      "handleVisibleParams": null,
                      "handleIsDisabledParams": null
                    }
                  ]
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DynamicChartConfig"
                },
                "example": {
                  "chartTitle": "Vendas por Mês",
                  "argument": "Mes",
                  "selectedSeries": 9,
                  "selectedDiagram": 1,
                  "selectedPalette": 4,
                  "serieMember": "Categoria",
                  "value": "TotalVendas",
                  "animate": true,
                  "showLegend": true,
                  "showSeriesLegend": true,
                  "dynamicReportGuid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                  "parameters": [
                    {
                      "name": "@initialDate",
                      "caption": "Data Inicial",
                      "description": "Data de início",
                      "value": "2025-01-01",
                      "defaultValueType": 1,
                      "dateTimeFunctions": 0,
                      "type": "Date",
                      "viewType": 7,
                      "entityTypeValue": null,
                      "paramHolder": "@initialDate",
                      "required": true,
                      "filter": null,
                      "group": 0,
                      "valueList": null,
                      "isDisabled": false,
                      "isVisible": true,
                      "query": null,
                      "handleVisibleParams": null,
                      "handleIsDisabledParams": null
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/gateway/dynamic-chart-reports/{guid}/export": {
      "get": {
        "tags": [
          "DynamicChartReports"
        ],
        "summary": "Exports the data of a dynamic chart report.",
        "parameters": [
          {
            "name": "guid",
            "in": "path",
            "description": "Unique identifier (GUID) of the chart report to be exported.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "string"
                }
              },
              "application/json": {
                "schema": {
                  "type": "string"
                }
              },
              "text/json": {
                "schema": {
                  "type": "string"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/gateway/dynamic-reports": {
      "post": {
        "tags": [
          "DynamicReports"
        ],
        "summary": "Creates a new dynamic report.",
        "requestBody": {
          "description": "Data of the dynamic report to be created.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DynamicReportDataDTO"
              },
              "example": {
                "guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                "name": "Vendas por Cliente",
                "description": "Relatório dinâmico de vendas agrupadas por cliente com filtro de datas",
                "query": {
                  "sqlQuery": "SELECT e.Name AS Cliente, SUM(dh.Total) AS Total FROM documentsheaders dh INNER JOIN entities e ON dh.EntityKeyId = e.KeyId",
                  "whereClause": "dh.CreationDate BETWEEN @initialDate AND @finalDate",
                  "otherClauses": "GROUP BY e.Name ORDER BY Total DESC"
                },
                "parameters": [
                  {
                    "name": "@initialDate",
                    "caption": "Data Inicial",
                    "parameterType": "Date",
                    "entityType": null,
                    "defaultValue": "2025-01-01",
                    "query": null,
                    "defaultValueType": 1,
                    "availableValueType": 0,
                    "availableValuesList": []
                  },
                  {
                    "name": "@finalDate",
                    "caption": "Data Final",
                    "parameterType": "Date",
                    "entityType": null,
                    "defaultValue": "2025-12-31",
                    "query": null,
                    "defaultValueType": 2,
                    "availableValueType": 0,
                    "availableValuesList": []
                  }
                ],
                "fields": [
                  {
                    "name": "Cliente",
                    "caption": "Nome do Cliente",
                    "fieldType": "String",
                    "entityType": null,
                    "entityLink": null,
                    "area": 1,
                    "formatting": null,
                    "isVisible": true
                  },
                  {
                    "name": "Total",
                    "caption": "Total Vendas",
                    "fieldType": "Number",
                    "entityType": null,
                    "entityLink": null,
                    "area": 2,
                    "formatting": "#,##0.00",
                    "isVisible": true
                  }
                ],
                "permissionType": 0,
                "reportType": 2,
                "isPivotReport": false,
                "dataAccess": "default",
                "addToRibbon": true,
                "showInPos": false,
                "userId": 1,
                "permissionGroupsId": [
                  1,
                  3
                ]
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DynamicReportDataDTO"
              },
              "example": {
                "guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                "name": "Vendas por Cliente",
                "description": "Relatório dinâmico de vendas agrupadas por cliente com filtro de datas",
                "query": {
                  "sqlQuery": "SELECT e.Name AS Cliente, SUM(dh.Total) AS Total FROM documentsheaders dh INNER JOIN entities e ON dh.EntityKeyId = e.KeyId",
                  "whereClause": "dh.CreationDate BETWEEN @initialDate AND @finalDate",
                  "otherClauses": "GROUP BY e.Name ORDER BY Total DESC"
                },
                "parameters": [
                  {
                    "name": "@initialDate",
                    "caption": "Data Inicial",
                    "parameterType": "Date",
                    "entityType": null,
                    "defaultValue": "2025-01-01",
                    "query": null,
                    "defaultValueType": 1,
                    "availableValueType": 0,
                    "availableValuesList": []
                  },
                  {
                    "name": "@finalDate",
                    "caption": "Data Final",
                    "parameterType": "Date",
                    "entityType": null,
                    "defaultValue": "2025-12-31",
                    "query": null,
                    "defaultValueType": 2,
                    "availableValueType": 0,
                    "availableValuesList": []
                  }
                ],
                "fields": [
                  {
                    "name": "Cliente",
                    "caption": "Nome do Cliente",
                    "fieldType": "String",
                    "entityType": null,
                    "entityLink": null,
                    "area": 1,
                    "formatting": null,
                    "isVisible": true
                  },
                  {
                    "name": "Total",
                    "caption": "Total Vendas",
                    "fieldType": "Number",
                    "entityType": null,
                    "entityLink": null,
                    "area": 2,
                    "formatting": "#,##0.00",
                    "isVisible": true
                  }
                ],
                "permissionType": 0,
                "reportType": 2,
                "isPivotReport": false,
                "dataAccess": "default",
                "addToRibbon": true,
                "showInPos": false,
                "userId": 1,
                "permissionGroupsId": [
                  1,
                  3
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DynamicReportDataDTO"
              },
              "example": {
                "guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                "name": "Vendas por Cliente",
                "description": "Relatório dinâmico de vendas agrupadas por cliente com filtro de datas",
                "query": {
                  "sqlQuery": "SELECT e.Name AS Cliente, SUM(dh.Total) AS Total FROM documentsheaders dh INNER JOIN entities e ON dh.EntityKeyId = e.KeyId",
                  "whereClause": "dh.CreationDate BETWEEN @initialDate AND @finalDate",
                  "otherClauses": "GROUP BY e.Name ORDER BY Total DESC"
                },
                "parameters": [
                  {
                    "name": "@initialDate",
                    "caption": "Data Inicial",
                    "parameterType": "Date",
                    "entityType": null,
                    "defaultValue": "2025-01-01",
                    "query": null,
                    "defaultValueType": 1,
                    "availableValueType": 0,
                    "availableValuesList": []
                  },
                  {
                    "name": "@finalDate",
                    "caption": "Data Final",
                    "parameterType": "Date",
                    "entityType": null,
                    "defaultValue": "2025-12-31",
                    "query": null,
                    "defaultValueType": 2,
                    "availableValueType": 0,
                    "availableValuesList": []
                  }
                ],
                "fields": [
                  {
                    "name": "Cliente",
                    "caption": "Nome do Cliente",
                    "fieldType": "String",
                    "entityType": null,
                    "entityLink": null,
                    "area": 1,
                    "formatting": null,
                    "isVisible": true
                  },
                  {
                    "name": "Total",
                    "caption": "Total Vendas",
                    "fieldType": "Number",
                    "entityType": null,
                    "entityLink": null,
                    "area": 2,
                    "formatting": "#,##0.00",
                    "isVisible": true
                  }
                ],
                "permissionType": 0,
                "reportType": 2,
                "isPivotReport": false,
                "dataAccess": "default",
                "addToRibbon": true,
                "showInPos": false,
                "userId": 1,
                "permissionGroupsId": [
                  1,
                  3
                ]
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      },
      "put": {
        "tags": [
          "DynamicReports"
        ],
        "summary": "Updates an existing dynamic report.",
        "requestBody": {
          "description": "Updated data of the dynamic report.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/DynamicReportDataDTO"
              },
              "example": {
                "guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                "name": "Vendas por Cliente",
                "description": "Relatório dinâmico de vendas agrupadas por cliente com filtro de datas",
                "query": {
                  "sqlQuery": "SELECT e.Name AS Cliente, SUM(dh.Total) AS Total FROM documentsheaders dh INNER JOIN entities e ON dh.EntityKeyId = e.KeyId",
                  "whereClause": "dh.CreationDate BETWEEN @initialDate AND @finalDate",
                  "otherClauses": "GROUP BY e.Name ORDER BY Total DESC"
                },
                "parameters": [
                  {
                    "name": "@initialDate",
                    "caption": "Data Inicial",
                    "parameterType": "Date",
                    "entityType": null,
                    "defaultValue": "2025-01-01",
                    "query": null,
                    "defaultValueType": 1,
                    "availableValueType": 0,
                    "availableValuesList": []
                  },
                  {
                    "name": "@finalDate",
                    "caption": "Data Final",
                    "parameterType": "Date",
                    "entityType": null,
                    "defaultValue": "2025-12-31",
                    "query": null,
                    "defaultValueType": 2,
                    "availableValueType": 0,
                    "availableValuesList": []
                  }
                ],
                "fields": [
                  {
                    "name": "Cliente",
                    "caption": "Nome do Cliente",
                    "fieldType": "String",
                    "entityType": null,
                    "entityLink": null,
                    "area": 1,
                    "formatting": null,
                    "isVisible": true
                  },
                  {
                    "name": "Total",
                    "caption": "Total Vendas",
                    "fieldType": "Number",
                    "entityType": null,
                    "entityLink": null,
                    "area": 2,
                    "formatting": "#,##0.00",
                    "isVisible": true
                  }
                ],
                "permissionType": 0,
                "reportType": 2,
                "isPivotReport": false,
                "dataAccess": "default",
                "addToRibbon": true,
                "showInPos": false,
                "userId": 1,
                "permissionGroupsId": [
                  1,
                  3
                ]
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/DynamicReportDataDTO"
              },
              "example": {
                "guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                "name": "Vendas por Cliente",
                "description": "Relatório dinâmico de vendas agrupadas por cliente com filtro de datas",
                "query": {
                  "sqlQuery": "SELECT e.Name AS Cliente, SUM(dh.Total) AS Total FROM documentsheaders dh INNER JOIN entities e ON dh.EntityKeyId = e.KeyId",
                  "whereClause": "dh.CreationDate BETWEEN @initialDate AND @finalDate",
                  "otherClauses": "GROUP BY e.Name ORDER BY Total DESC"
                },
                "parameters": [
                  {
                    "name": "@initialDate",
                    "caption": "Data Inicial",
                    "parameterType": "Date",
                    "entityType": null,
                    "defaultValue": "2025-01-01",
                    "query": null,
                    "defaultValueType": 1,
                    "availableValueType": 0,
                    "availableValuesList": []
                  },
                  {
                    "name": "@finalDate",
                    "caption": "Data Final",
                    "parameterType": "Date",
                    "entityType": null,
                    "defaultValue": "2025-12-31",
                    "query": null,
                    "defaultValueType": 2,
                    "availableValueType": 0,
                    "availableValuesList": []
                  }
                ],
                "fields": [
                  {
                    "name": "Cliente",
                    "caption": "Nome do Cliente",
                    "fieldType": "String",
                    "entityType": null,
                    "entityLink": null,
                    "area": 1,
                    "formatting": null,
                    "isVisible": true
                  },
                  {
                    "name": "Total",
                    "caption": "Total Vendas",
                    "fieldType": "Number",
                    "entityType": null,
                    "entityLink": null,
                    "area": 2,
                    "formatting": "#,##0.00",
                    "isVisible": true
                  }
                ],
                "permissionType": 0,
                "reportType": 2,
                "isPivotReport": false,
                "dataAccess": "default",
                "addToRibbon": true,
                "showInPos": false,
                "userId": 1,
                "permissionGroupsId": [
                  1,
                  3
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/DynamicReportDataDTO"
              },
              "example": {
                "guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                "name": "Vendas por Cliente",
                "description": "Relatório dinâmico de vendas agrupadas por cliente com filtro de datas",
                "query": {
                  "sqlQuery": "SELECT e.Name AS Cliente, SUM(dh.Total) AS Total FROM documentsheaders dh INNER JOIN entities e ON dh.EntityKeyId = e.KeyId",
                  "whereClause": "dh.CreationDate BETWEEN @initialDate AND @finalDate",
                  "otherClauses": "GROUP BY e.Name ORDER BY Total DESC"
                },
                "parameters": [
                  {
                    "name": "@initialDate",
                    "caption": "Data Inicial",
                    "parameterType": "Date",
                    "entityType": null,
                    "defaultValue": "2025-01-01",
                    "query": null,
                    "defaultValueType": 1,
                    "availableValueType": 0,
                    "availableValuesList": []
                  },
                  {
                    "name": "@finalDate",
                    "caption": "Data Final",
                    "parameterType": "Date",
                    "entityType": null,
                    "defaultValue": "2025-12-31",
                    "query": null,
                    "defaultValueType": 2,
                    "availableValueType": 0,
                    "availableValuesList": []
                  }
                ],
                "fields": [
                  {
                    "name": "Cliente",
                    "caption": "Nome do Cliente",
                    "fieldType": "String",
                    "entityType": null,
                    "entityLink": null,
                    "area": 1,
                    "formatting": null,
                    "isVisible": true
                  },
                  {
                    "name": "Total",
                    "caption": "Total Vendas",
                    "fieldType": "Number",
                    "entityType": null,
                    "entityLink": null,
                    "area": 2,
                    "formatting": "#,##0.00",
                    "isVisible": true
                  }
                ],
                "permissionType": 0,
                "reportType": 2,
                "isPivotReport": false,
                "dataAccess": "default",
                "addToRibbon": true,
                "showInPos": false,
                "userId": 1,
                "permissionGroupsId": [
                  1,
                  3
                ]
              }
            }
          }
        },
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/gateway/dynamic-reports/{guid}": {
      "delete": {
        "tags": [
          "DynamicReports"
        ],
        "summary": "Deletes a dynamic report by its unique identifier.",
        "parameters": [
          {
            "name": "guid",
            "in": "path",
            "description": "Unique identifier (GUID) of the dynamic report to be deleted.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "No Content"
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      },
      "get": {
        "tags": [
          "DynamicReports"
        ],
        "summary": "Gets a dynamic report by its unique identifier.",
        "parameters": [
          {
            "name": "guid",
            "in": "path",
            "description": "Unique identifier (GUID) of the dynamic report.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/DynamicReportDataDTO"
                },
                "example": {
                  "guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                  "name": "Vendas por Cliente",
                  "description": "Relatório dinâmico de vendas agrupadas por cliente com filtro de datas",
                  "query": {
                    "sqlQuery": "SELECT e.Name AS Cliente, SUM(dh.Total) AS Total FROM documentsheaders dh INNER JOIN entities e ON dh.EntityKeyId = e.KeyId",
                    "whereClause": "dh.CreationDate BETWEEN @initialDate AND @finalDate",
                    "otherClauses": "GROUP BY e.Name ORDER BY Total DESC"
                  },
                  "parameters": [
                    {
                      "name": "@initialDate",
                      "caption": "Data Inicial",
                      "parameterType": "Date",
                      "entityType": null,
                      "defaultValue": "2025-01-01",
                      "query": null,
                      "defaultValueType": 1,
                      "availableValueType": 0,
                      "availableValuesList": []
                    }
                  ],
                  "fields": [
                    {
                      "name": "Cliente",
                      "caption": "Nome do Cliente",
                      "fieldType": "String",
                      "entityType": null,
                      "entityLink": null,
                      "area": 1,
                      "formatting": null,
                      "isVisible": true
                    },
                    {
                      "name": "Total",
                      "caption": "Total Vendas",
                      "fieldType": "Number",
                      "entityType": null,
                      "entityLink": null,
                      "area": 2,
                      "formatting": "#,##0.00",
                      "isVisible": true
                    }
                  ],
                  "permissionType": 0,
                  "reportType": 2,
                  "isPivotReport": false,
                  "dataAccess": "default",
                  "addToRibbon": true,
                  "showInPos": false,
                  "userId": 1,
                  "permissionGroupsId": [
                    1,
                    3
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/DynamicReportDataDTO"
                },
                "example": {
                  "guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                  "name": "Vendas por Cliente",
                  "description": "Relatório dinâmico de vendas agrupadas por cliente com filtro de datas",
                  "query": {
                    "sqlQuery": "SELECT e.Name AS Cliente, SUM(dh.Total) AS Total FROM documentsheaders dh INNER JOIN entities e ON dh.EntityKeyId = e.KeyId",
                    "whereClause": "dh.CreationDate BETWEEN @initialDate AND @finalDate",
                    "otherClauses": "GROUP BY e.Name ORDER BY Total DESC"
                  },
                  "parameters": [
                    {
                      "name": "@initialDate",
                      "caption": "Data Inicial",
                      "parameterType": "Date",
                      "entityType": null,
                      "defaultValue": "2025-01-01",
                      "query": null,
                      "defaultValueType": 1,
                      "availableValueType": 0,
                      "availableValuesList": []
                    }
                  ],
                  "fields": [
                    {
                      "name": "Cliente",
                      "caption": "Nome do Cliente",
                      "fieldType": "String",
                      "entityType": null,
                      "entityLink": null,
                      "area": 1,
                      "formatting": null,
                      "isVisible": true
                    },
                    {
                      "name": "Total",
                      "caption": "Total Vendas",
                      "fieldType": "Number",
                      "entityType": null,
                      "entityLink": null,
                      "area": 2,
                      "formatting": "#,##0.00",
                      "isVisible": true
                    }
                  ],
                  "permissionType": 0,
                  "reportType": 2,
                  "isPivotReport": false,
                  "dataAccess": "default",
                  "addToRibbon": true,
                  "showInPos": false,
                  "userId": 1,
                  "permissionGroupsId": [
                    1,
                    3
                  ]
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/DynamicReportDataDTO"
                },
                "example": {
                  "guid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
                  "name": "Vendas por Cliente",
                  "description": "Relatório dinâmico de vendas agrupadas por cliente com filtro de datas",
                  "query": {
                    "sqlQuery": "SELECT e.Name AS Cliente, SUM(dh.Total) AS Total FROM documentsheaders dh INNER JOIN entities e ON dh.EntityKeyId = e.KeyId",
                    "whereClause": "dh.CreationDate BETWEEN @initialDate AND @finalDate",
                    "otherClauses": "GROUP BY e.Name ORDER BY Total DESC"
                  },
                  "parameters": [
                    {
                      "name": "@initialDate",
                      "caption": "Data Inicial",
                      "parameterType": "Date",
                      "entityType": null,
                      "defaultValue": "2025-01-01",
                      "query": null,
                      "defaultValueType": 1,
                      "availableValueType": 0,
                      "availableValuesList": []
                    }
                  ],
                  "fields": [
                    {
                      "name": "Cliente",
                      "caption": "Nome do Cliente",
                      "fieldType": "String",
                      "entityType": null,
                      "entityLink": null,
                      "area": 1,
                      "formatting": null,
                      "isVisible": true
                    },
                    {
                      "name": "Total",
                      "caption": "Total Vendas",
                      "fieldType": "Number",
                      "entityType": null,
                      "entityLink": null,
                      "area": 2,
                      "formatting": "#,##0.00",
                      "isVisible": true
                    }
                  ],
                  "permissionType": 0,
                  "reportType": 2,
                  "isPivotReport": false,
                  "dataAccess": "default",
                  "addToRibbon": true,
                  "showInPos": false,
                  "userId": 1,
                  "permissionGroupsId": [
                    1,
                    3
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/gateway/dynamic-reports/{guid}/config": {
      "get": {
        "tags": [
          "DynamicReports"
        ],
        "summary": "Gets the configuration of a dynamic report by its unique identifier.",
        "parameters": [
          {
            "name": "guid",
            "in": "path",
            "description": "Unique identifier (GUID) of the dynamic report.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ReportConfig"
                },
                "example": {
                  "reportId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
                  "title": "Vendas por Cliente",
                  "columns": [
                    {
                      "dataField": "CustomerName",
                      "displayName": "Cliente",
                      "dataType": "String",
                      "visible": true,
                      "link": null,
                      "alignment": "left",
                      "width": null,
                      "fixed": false,
                      "fixedPosition": null,
                      "allowHiding": true,
                      "allowSorting": true,
                      "translationKey": null,
                      "formatConfigField": "",
                      "format": null,
                      "visibleIndex": 0
                    },
                    {
                      "dataField": "TotalAmount",
                      "displayName": "Total",
                      "dataType": "Number",
                      "visible": true,
                      "link": null,
                      "alignment": "right",
                      "width": 120,
                      "fixed": false,
                      "fixedPosition": null,
                      "allowHiding": false,
                      "allowSorting": true,
                      "translationKey": null,
                      "formatConfigField": "currency",
                      "format": null,
                      "visibleIndex": 1
                    },
                    {
                      "dataField": "DocumentCount",
                      "displayName": "Nº Documentos",
                      "dataType": "Number",
                      "visible": true,
                      "link": null,
                      "alignment": "right",
                      "width": 100,
                      "fixed": false,
                      "fixedPosition": null,
                      "allowHiding": true,
                      "allowSorting": true,
                      "translationKey": null,
                      "formatConfigField": "",
                      "format": null,
                      "visibleIndex": 2
                    }
                  ],
                  "keyExpr": "CustomerId",
                  "parentIdExpr": null,
                  "parameters": [
                    {
                      "name": "@initialDate",
                      "caption": "Data Inicial",
                      "description": "Data de início do período",
                      "value": "2025-01-01",
                      "defaultValueType": 1,
                      "dateTimeFunctions": 0,
                      "type": "Date",
                      "viewType": 7,
                      "entityTypeValue": null,
                      "paramHolder": "@initialDate",
                      "required": true,
                      "filter": null,
                      "group": 0,
                      "valueList": null,
                      "isDisabled": false,
                      "isVisible": true,
                      "query": null,
                      "handleVisibleParams": null,
                      "handleIsDisabledParams": null
                    },
                    {
                      "name": "@finalDate",
                      "caption": "Data Final",
                      "description": "Data de fim do período",
                      "value": "2025-12-31",
                      "defaultValueType": 2,
                      "dateTimeFunctions": 13,
                      "type": "Date",
                      "viewType": 7,
                      "entityTypeValue": null,
                      "paramHolder": "@finalDate",
                      "required": true,
                      "filter": null,
                      "group": 0,
                      "valueList": null,
                      "isDisabled": false,
                      "isVisible": true,
                      "query": null,
                      "handleVisibleParams": null,
                      "handleIsDisabledParams": null
                    }
                  ],
                  "hasSummary": true,
                  "showMasterDetail": false,
                  "masterDetailConfig": null,
                  "additionalData": null,
                  "query": "SELECT e.KeyId AS EntityKeyId, e.Name AS CustomerName, COUNT(*) AS DocumentCount, SUM(dh.Total) AS TotalAmount FROM documentsheaders dh INNER JOIN entities e ON dh.EntityKeyId = e.KeyId WHERE dh.CreationDate BETWEEN @initialDate AND @finalDate GROUP BY e.KeyId, e.Name"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportConfig"
                },
                "example": {
                  "reportId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
                  "title": "Vendas por Cliente",
                  "columns": [
                    {
                      "dataField": "CustomerName",
                      "displayName": "Cliente",
                      "dataType": "String",
                      "visible": true,
                      "link": null,
                      "alignment": "left",
                      "width": null,
                      "fixed": false,
                      "fixedPosition": null,
                      "allowHiding": true,
                      "allowSorting": true,
                      "translationKey": null,
                      "formatConfigField": "",
                      "format": null,
                      "visibleIndex": 0
                    },
                    {
                      "dataField": "TotalAmount",
                      "displayName": "Total",
                      "dataType": "Number",
                      "visible": true,
                      "link": null,
                      "alignment": "right",
                      "width": 120,
                      "fixed": false,
                      "fixedPosition": null,
                      "allowHiding": false,
                      "allowSorting": true,
                      "translationKey": null,
                      "formatConfigField": "currency",
                      "format": null,
                      "visibleIndex": 1
                    },
                    {
                      "dataField": "DocumentCount",
                      "displayName": "Nº Documentos",
                      "dataType": "Number",
                      "visible": true,
                      "link": null,
                      "alignment": "right",
                      "width": 100,
                      "fixed": false,
                      "fixedPosition": null,
                      "allowHiding": true,
                      "allowSorting": true,
                      "translationKey": null,
                      "formatConfigField": "",
                      "format": null,
                      "visibleIndex": 2
                    }
                  ],
                  "keyExpr": "CustomerId",
                  "parentIdExpr": null,
                  "parameters": [
                    {
                      "name": "@initialDate",
                      "caption": "Data Inicial",
                      "description": "Data de início do período",
                      "value": "2025-01-01",
                      "defaultValueType": 1,
                      "dateTimeFunctions": 0,
                      "type": "Date",
                      "viewType": 7,
                      "entityTypeValue": null,
                      "paramHolder": "@initialDate",
                      "required": true,
                      "filter": null,
                      "group": 0,
                      "valueList": null,
                      "isDisabled": false,
                      "isVisible": true,
                      "query": null,
                      "handleVisibleParams": null,
                      "handleIsDisabledParams": null
                    },
                    {
                      "name": "@finalDate",
                      "caption": "Data Final",
                      "description": "Data de fim do período",
                      "value": "2025-12-31",
                      "defaultValueType": 2,
                      "dateTimeFunctions": 13,
                      "type": "Date",
                      "viewType": 7,
                      "entityTypeValue": null,
                      "paramHolder": "@finalDate",
                      "required": true,
                      "filter": null,
                      "group": 0,
                      "valueList": null,
                      "isDisabled": false,
                      "isVisible": true,
                      "query": null,
                      "handleVisibleParams": null,
                      "handleIsDisabledParams": null
                    }
                  ],
                  "hasSummary": true,
                  "showMasterDetail": false,
                  "masterDetailConfig": null,
                  "additionalData": null,
                  "query": "SELECT e.KeyId AS EntityKeyId, e.Name AS CustomerName, COUNT(*) AS DocumentCount, SUM(dh.Total) AS TotalAmount FROM documentsheaders dh INNER JOIN entities e ON dh.EntityKeyId = e.KeyId WHERE dh.CreationDate BETWEEN @initialDate AND @finalDate GROUP BY e.KeyId, e.Name"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ReportConfig"
                },
                "example": {
                  "reportId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
                  "title": "Vendas por Cliente",
                  "columns": [
                    {
                      "dataField": "CustomerName",
                      "displayName": "Cliente",
                      "dataType": "String",
                      "visible": true,
                      "link": null,
                      "alignment": "left",
                      "width": null,
                      "fixed": false,
                      "fixedPosition": null,
                      "allowHiding": true,
                      "allowSorting": true,
                      "translationKey": null,
                      "formatConfigField": "",
                      "format": null,
                      "visibleIndex": 0
                    },
                    {
                      "dataField": "TotalAmount",
                      "displayName": "Total",
                      "dataType": "Number",
                      "visible": true,
                      "link": null,
                      "alignment": "right",
                      "width": 120,
                      "fixed": false,
                      "fixedPosition": null,
                      "allowHiding": false,
                      "allowSorting": true,
                      "translationKey": null,
                      "formatConfigField": "currency",
                      "format": null,
                      "visibleIndex": 1
                    },
                    {
                      "dataField": "DocumentCount",
                      "displayName": "Nº Documentos",
                      "dataType": "Number",
                      "visible": true,
                      "link": null,
                      "alignment": "right",
                      "width": 100,
                      "fixed": false,
                      "fixedPosition": null,
                      "allowHiding": true,
                      "allowSorting": true,
                      "translationKey": null,
                      "formatConfigField": "",
                      "format": null,
                      "visibleIndex": 2
                    }
                  ],
                  "keyExpr": "CustomerId",
                  "parentIdExpr": null,
                  "parameters": [
                    {
                      "name": "@initialDate",
                      "caption": "Data Inicial",
                      "description": "Data de início do período",
                      "value": "2025-01-01",
                      "defaultValueType": 1,
                      "dateTimeFunctions": 0,
                      "type": "Date",
                      "viewType": 7,
                      "entityTypeValue": null,
                      "paramHolder": "@initialDate",
                      "required": true,
                      "filter": null,
                      "group": 0,
                      "valueList": null,
                      "isDisabled": false,
                      "isVisible": true,
                      "query": null,
                      "handleVisibleParams": null,
                      "handleIsDisabledParams": null
                    },
                    {
                      "name": "@finalDate",
                      "caption": "Data Final",
                      "description": "Data de fim do período",
                      "value": "2025-12-31",
                      "defaultValueType": 2,
                      "dateTimeFunctions": 13,
                      "type": "Date",
                      "viewType": 7,
                      "entityTypeValue": null,
                      "paramHolder": "@finalDate",
                      "required": true,
                      "filter": null,
                      "group": 0,
                      "valueList": null,
                      "isDisabled": false,
                      "isVisible": true,
                      "query": null,
                      "handleVisibleParams": null,
                      "handleIsDisabledParams": null
                    }
                  ],
                  "hasSummary": true,
                  "showMasterDetail": false,
                  "masterDetailConfig": null,
                  "additionalData": null,
                  "query": "SELECT e.KeyId AS EntityKeyId, e.Name AS CustomerName, COUNT(*) AS DocumentCount, SUM(dh.Total) AS TotalAmount FROM documentsheaders dh INNER JOIN entities e ON dh.EntityKeyId = e.KeyId WHERE dh.CreationDate BETWEEN @initialDate AND @finalDate GROUP BY e.KeyId, e.Name"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/gateway/dynamic-reports/{guid}/data": {
      "get": {
        "tags": [
          "DynamicReports"
        ],
        "summary": "Gets the data of a dynamic report by its unique identifier.",
        "parameters": [
          {
            "name": "guid",
            "in": "path",
            "description": "Unique identifier (GUID) of the dynamic report.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jsonParameters",
            "in": "query",
            "description": "Optional JSON parameters to filter the report data.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectResultReport"
                },
                "example": {
                  "count": 3,
                  "value": [
                    {
                      "CustomerName": "Empresa ABC, Lda.",
                      "TotalAmount": 15230.5,
                      "DocumentCount": 42
                    },
                    {
                      "CustomerName": "Restaurante O Manel",
                      "TotalAmount": 8750,
                      "DocumentCount": 28
                    },
                    {
                      "CustomerName": "Supermercado Central",
                      "TotalAmount": 5420.75,
                      "DocumentCount": 15
                    }
                  ],
                  "summaryData": {
                    "icon": "chart-bar",
                    "header": "Resumo de Vendas",
                    "isFullWidth": true,
                    "sections": [
                      {
                        "title": "Totais",
                        "items": [
                          {
                            "label": "Total Vendas",
                            "format": "#,##0.00 €",
                            "value": 29401.25,
                            "addSuffix": false
                          },
                          {
                            "label": "Nº Documentos",
                            "format": null,
                            "value": 85,
                            "addSuffix": false
                          }
                        ]
                      }
                    ]
                  },
                  "additionalData": null
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectResultReport"
                },
                "example": {
                  "count": 3,
                  "value": [
                    {
                      "CustomerName": "Empresa ABC, Lda.",
                      "TotalAmount": 15230.5,
                      "DocumentCount": 42
                    },
                    {
                      "CustomerName": "Restaurante O Manel",
                      "TotalAmount": 8750,
                      "DocumentCount": 28
                    },
                    {
                      "CustomerName": "Supermercado Central",
                      "TotalAmount": 5420.75,
                      "DocumentCount": 15
                    }
                  ],
                  "summaryData": {
                    "icon": "chart-bar",
                    "header": "Resumo de Vendas",
                    "isFullWidth": true,
                    "sections": [
                      {
                        "title": "Totais",
                        "items": [
                          {
                            "label": "Total Vendas",
                            "format": "#,##0.00 €",
                            "value": 29401.25,
                            "addSuffix": false
                          },
                          {
                            "label": "Nº Documentos",
                            "format": null,
                            "value": 85,
                            "addSuffix": false
                          }
                        ]
                      }
                    ]
                  },
                  "additionalData": null
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectResultReport"
                },
                "example": {
                  "count": 3,
                  "value": [
                    {
                      "CustomerName": "Empresa ABC, Lda.",
                      "TotalAmount": 15230.5,
                      "DocumentCount": 42
                    },
                    {
                      "CustomerName": "Restaurante O Manel",
                      "TotalAmount": 8750,
                      "DocumentCount": 28
                    },
                    {
                      "CustomerName": "Supermercado Central",
                      "TotalAmount": 5420.75,
                      "DocumentCount": 15
                    }
                  ],
                  "summaryData": {
                    "icon": "chart-bar",
                    "header": "Resumo de Vendas",
                    "isFullWidth": true,
                    "sections": [
                      {
                        "title": "Totais",
                        "items": [
                          {
                            "label": "Total Vendas",
                            "format": "#,##0.00 €",
                            "value": 29401.25,
                            "addSuffix": false
                          },
                          {
                            "label": "Nº Documentos",
                            "format": null,
                            "value": 85,
                            "addSuffix": false
                          }
                        ]
                      }
                    ]
                  },
                  "additionalData": null
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/gateway/dynamic-reports/execute-sqlquery": {
      "post": {
        "tags": [
          "DynamicReports"
        ],
        "summary": "Executes a SQL query and returns the results.",
        "parameters": [
          {
            "name": "jsonParameters",
            "in": "query",
            "description": "Optional JSON parameters for the SQL query.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "Object containing the SQL query to be executed.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SqlQueryDTO"
              },
              "example": {
                "sqlQuery": "SELECT e.Name AS Cliente, e.TaxId AS NIF, SUM(dh.Total) AS TotalVendas FROM documentsheaders dh INNER JOIN entities e ON dh.EntityKeyId = e.KeyId",
                "whereClause": "dh.CreationDate BETWEEN @initialDate AND @finalDate",
                "otherClauses": "GROUP BY e.Name, e.TaxId ORDER BY TotalVendas DESC"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SqlQueryDTO"
              },
              "example": {
                "sqlQuery": "SELECT e.Name AS Cliente, e.TaxId AS NIF, SUM(dh.Total) AS TotalVendas FROM documentsheaders dh INNER JOIN entities e ON dh.EntityKeyId = e.KeyId",
                "whereClause": "dh.CreationDate BETWEEN @initialDate AND @finalDate",
                "otherClauses": "GROUP BY e.Name, e.TaxId ORDER BY TotalVendas DESC"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SqlQueryDTO"
              },
              "example": {
                "sqlQuery": "SELECT e.Name AS Cliente, e.TaxId AS NIF, SUM(dh.Total) AS TotalVendas FROM documentsheaders dh INNER JOIN entities e ON dh.EntityKeyId = e.KeyId",
                "whereClause": "dh.CreationDate BETWEEN @initialDate AND @finalDate",
                "otherClauses": "GROUP BY e.Name, e.TaxId ORDER BY TotalVendas DESC"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ExecuteQueryResponse"
                },
                "example": {
                  "count": 3,
                  "value": [
                    {
                      "Cliente": "Empresa ABC, Lda.",
                      "NIF": "501234567",
                      "TotalVendas": 15230.5
                    },
                    {
                      "Cliente": "Restaurante O Manel",
                      "NIF": "509876543",
                      "TotalVendas": 8750
                    },
                    {
                      "Cliente": "Supermercado Central",
                      "NIF": "504567890",
                      "TotalVendas": 5420.75
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecuteQueryResponse"
                },
                "example": {
                  "count": 3,
                  "value": [
                    {
                      "Cliente": "Empresa ABC, Lda.",
                      "NIF": "501234567",
                      "TotalVendas": 15230.5
                    },
                    {
                      "Cliente": "Restaurante O Manel",
                      "NIF": "509876543",
                      "TotalVendas": 8750
                    },
                    {
                      "Cliente": "Supermercado Central",
                      "NIF": "504567890",
                      "TotalVendas": 5420.75
                    }
                  ]
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ExecuteQueryResponse"
                },
                "example": {
                  "count": 3,
                  "value": [
                    {
                      "Cliente": "Empresa ABC, Lda.",
                      "NIF": "501234567",
                      "TotalVendas": 15230.5
                    },
                    {
                      "Cliente": "Restaurante O Manel",
                      "NIF": "509876543",
                      "TotalVendas": 8750
                    },
                    {
                      "Cliente": "Supermercado Central",
                      "NIF": "504567890",
                      "TotalVendas": 5420.75
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/gateway/dynamic-reports/parameters": {
      "post": {
        "tags": [
          "DynamicReports"
        ],
        "summary": "Gets the parameter details of a list of dynamic reports.",
        "requestBody": {
          "description": "List of DTOs containing the parameters of dynamic reports.",
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DynamicReportParameterDTO"
                }
              },
              "example": [
                {
                  "name": "@initialDate",
                  "caption": "Data Inicial",
                  "parameterType": "Date",
                  "entityType": null,
                  "defaultValue": "2025-01-01",
                  "query": null,
                  "defaultValueType": 1,
                  "availableValueType": 0,
                  "availableValuesList": []
                },
                {
                  "name": "@finalDate",
                  "caption": "Data Final",
                  "parameterType": "Date",
                  "entityType": null,
                  "defaultValue": "2025-12-31",
                  "query": null,
                  "defaultValueType": 2,
                  "availableValueType": 0,
                  "availableValuesList": []
                },
                {
                  "name": "@entityId",
                  "caption": "Cliente",
                  "parameterType": "String",
                  "entityType": "Customer",
                  "defaultValue": null,
                  "query": "SELECT KeyId, Name FROM entities WHERE EntityType = 0",
                  "defaultValueType": 0,
                  "availableValueType": 2,
                  "availableValuesList": [
                    {
                      "description": "Empresa ABC, Lda.",
                      "value": "C001"
                    },
                    {
                      "description": "Restaurante O Manel",
                      "value": "C002"
                    }
                  ]
                }
              ]
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DynamicReportParameterDTO"
                }
              },
              "example": [
                {
                  "name": "@initialDate",
                  "caption": "Data Inicial",
                  "parameterType": "Date",
                  "entityType": null,
                  "defaultValue": "2025-01-01",
                  "query": null,
                  "defaultValueType": 1,
                  "availableValueType": 0,
                  "availableValuesList": []
                },
                {
                  "name": "@finalDate",
                  "caption": "Data Final",
                  "parameterType": "Date",
                  "entityType": null,
                  "defaultValue": "2025-12-31",
                  "query": null,
                  "defaultValueType": 2,
                  "availableValueType": 0,
                  "availableValuesList": []
                },
                {
                  "name": "@entityId",
                  "caption": "Cliente",
                  "parameterType": "String",
                  "entityType": "Customer",
                  "defaultValue": null,
                  "query": "SELECT KeyId, Name FROM entities WHERE EntityType = 0",
                  "defaultValueType": 0,
                  "availableValueType": 2,
                  "availableValuesList": [
                    {
                      "description": "Empresa ABC, Lda.",
                      "value": "C001"
                    },
                    {
                      "description": "Restaurante O Manel",
                      "value": "C002"
                    }
                  ]
                }
              ]
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "$ref": "#/components/schemas/DynamicReportParameterDTO"
                }
              },
              "example": [
                {
                  "name": "@initialDate",
                  "caption": "Data Inicial",
                  "parameterType": "Date",
                  "entityType": null,
                  "defaultValue": "2025-01-01",
                  "query": null,
                  "defaultValueType": 1,
                  "availableValueType": 0,
                  "availableValuesList": []
                },
                {
                  "name": "@finalDate",
                  "caption": "Data Final",
                  "parameterType": "Date",
                  "entityType": null,
                  "defaultValue": "2025-12-31",
                  "query": null,
                  "defaultValueType": 2,
                  "availableValueType": 0,
                  "availableValuesList": []
                },
                {
                  "name": "@entityId",
                  "caption": "Cliente",
                  "parameterType": "String",
                  "entityType": "Customer",
                  "defaultValue": null,
                  "query": "SELECT KeyId, Name FROM entities WHERE EntityType = 0",
                  "defaultValueType": 0,
                  "availableValueType": 2,
                  "availableValuesList": [
                    {
                      "description": "Empresa ABC, Lda.",
                      "value": "C001"
                    },
                    {
                      "description": "Restaurante O Manel",
                      "value": "C002"
                    }
                  ]
                }
              ]
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ReportParameterDetail"
                  }
                },
                "example": [
                  {
                    "name": "@initialDate",
                    "caption": "Data Inicial",
                    "description": "Data de início do período do relatório",
                    "value": "2025-01-01",
                    "defaultValueType": 1,
                    "dateTimeFunctions": 0,
                    "type": "Date",
                    "viewType": 7,
                    "entityTypeValue": null,
                    "paramHolder": "@initialDate",
                    "required": true,
                    "filter": null,
                    "group": 0,
                    "valueList": null,
                    "isDisabled": false,
                    "isVisible": true,
                    "query": null,
                    "handleVisibleParams": null,
                    "handleIsDisabledParams": null
                  },
                  {
                    "name": "@finalDate",
                    "caption": "Data Final",
                    "description": "Data de fim do período do relatório",
                    "value": "2025-12-31",
                    "defaultValueType": 2,
                    "dateTimeFunctions": 13,
                    "type": "Date",
                    "viewType": 7,
                    "entityTypeValue": null,
                    "paramHolder": "@finalDate",
                    "required": true,
                    "filter": null,
                    "group": 0,
                    "valueList": null,
                    "isDisabled": false,
                    "isVisible": true,
                    "query": null,
                    "handleVisibleParams": null,
                    "handleIsDisabledParams": null
                  },
                  {
                    "name": "@entityId",
                    "caption": "Cliente",
                    "description": "Selecione o cliente para filtrar",
                    "value": "",
                    "defaultValueType": 0,
                    "dateTimeFunctions": 0,
                    "type": "String",
                    "viewType": 2,
                    "entityTypeValue": "Customer",
                    "paramHolder": "@entityId",
                    "required": false,
                    "filter": null,
                    "group": 1,
                    "valueList": null,
                    "isDisabled": false,
                    "isVisible": true,
                    "query": null,
                    "handleVisibleParams": null,
                    "handleIsDisabledParams": null
                  }
                ]
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ReportParameterDetail"
                  }
                },
                "example": [
                  {
                    "name": "@initialDate",
                    "caption": "Data Inicial",
                    "description": "Data de início do período do relatório",
                    "value": "2025-01-01",
                    "defaultValueType": 1,
                    "dateTimeFunctions": 0,
                    "type": "Date",
                    "viewType": 7,
                    "entityTypeValue": null,
                    "paramHolder": "@initialDate",
                    "required": true,
                    "filter": null,
                    "group": 0,
                    "valueList": null,
                    "isDisabled": false,
                    "isVisible": true,
                    "query": null,
                    "handleVisibleParams": null,
                    "handleIsDisabledParams": null
                  },
                  {
                    "name": "@finalDate",
                    "caption": "Data Final",
                    "description": "Data de fim do período do relatório",
                    "value": "2025-12-31",
                    "defaultValueType": 2,
                    "dateTimeFunctions": 13,
                    "type": "Date",
                    "viewType": 7,
                    "entityTypeValue": null,
                    "paramHolder": "@finalDate",
                    "required": true,
                    "filter": null,
                    "group": 0,
                    "valueList": null,
                    "isDisabled": false,
                    "isVisible": true,
                    "query": null,
                    "handleVisibleParams": null,
                    "handleIsDisabledParams": null
                  },
                  {
                    "name": "@entityId",
                    "caption": "Cliente",
                    "description": "Selecione o cliente para filtrar",
                    "value": "",
                    "defaultValueType": 0,
                    "dateTimeFunctions": 0,
                    "type": "String",
                    "viewType": 2,
                    "entityTypeValue": "Customer",
                    "paramHolder": "@entityId",
                    "required": false,
                    "filter": null,
                    "group": 1,
                    "valueList": null,
                    "isDisabled": false,
                    "isVisible": true,
                    "query": null,
                    "handleVisibleParams": null,
                    "handleIsDisabledParams": null
                  }
                ]
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ReportParameterDetail"
                  }
                },
                "example": [
                  {
                    "name": "@initialDate",
                    "caption": "Data Inicial",
                    "description": "Data de início do período do relatório",
                    "value": "2025-01-01",
                    "defaultValueType": 1,
                    "dateTimeFunctions": 0,
                    "type": "Date",
                    "viewType": 7,
                    "entityTypeValue": null,
                    "paramHolder": "@initialDate",
                    "required": true,
                    "filter": null,
                    "group": 0,
                    "valueList": null,
                    "isDisabled": false,
                    "isVisible": true,
                    "query": null,
                    "handleVisibleParams": null,
                    "handleIsDisabledParams": null
                  },
                  {
                    "name": "@finalDate",
                    "caption": "Data Final",
                    "description": "Data de fim do período do relatório",
                    "value": "2025-12-31",
                    "defaultValueType": 2,
                    "dateTimeFunctions": 13,
                    "type": "Date",
                    "viewType": 7,
                    "entityTypeValue": null,
                    "paramHolder": "@finalDate",
                    "required": true,
                    "filter": null,
                    "group": 0,
                    "valueList": null,
                    "isDisabled": false,
                    "isVisible": true,
                    "query": null,
                    "handleVisibleParams": null,
                    "handleIsDisabledParams": null
                  },
                  {
                    "name": "@entityId",
                    "caption": "Cliente",
                    "description": "Selecione o cliente para filtrar",
                    "value": "",
                    "defaultValueType": 0,
                    "dateTimeFunctions": 0,
                    "type": "String",
                    "viewType": 2,
                    "entityTypeValue": "Customer",
                    "paramHolder": "@entityId",
                    "required": false,
                    "filter": null,
                    "group": 1,
                    "valueList": null,
                    "isDisabled": false,
                    "isVisible": true,
                    "query": null,
                    "handleVisibleParams": null,
                    "handleIsDisabledParams": null
                  }
                ]
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/gateway/dynamic-reports/verify-sqlquery": {
      "post": {
        "tags": [
          "DynamicReports"
        ],
        "summary": "Tests the validity of a SQL query without executing it.",
        "requestBody": {
          "description": "Object containing the SQL query to be tested.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SqlQueryDTO"
              },
              "example": {
                "sqlQuery": "SELECT e.Name AS Cliente, e.TaxId AS NIF, SUM(dh.Total) AS TotalVendas FROM documentsheaders dh INNER JOIN entities e ON dh.EntityKeyId = e.KeyId",
                "whereClause": "dh.CreationDate BETWEEN @initialDate AND @finalDate",
                "otherClauses": "GROUP BY e.Name, e.TaxId ORDER BY TotalVendas DESC"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SqlQueryDTO"
              },
              "example": {
                "sqlQuery": "SELECT e.Name AS Cliente, e.TaxId AS NIF, SUM(dh.Total) AS TotalVendas FROM documentsheaders dh INNER JOIN entities e ON dh.EntityKeyId = e.KeyId",
                "whereClause": "dh.CreationDate BETWEEN @initialDate AND @finalDate",
                "otherClauses": "GROUP BY e.Name, e.TaxId ORDER BY TotalVendas DESC"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SqlQueryDTO"
              },
              "example": {
                "sqlQuery": "SELECT e.Name AS Cliente, e.TaxId AS NIF, SUM(dh.Total) AS TotalVendas FROM documentsheaders dh INNER JOIN entities e ON dh.EntityKeyId = e.KeyId",
                "whereClause": "dh.CreationDate BETWEEN @initialDate AND @finalDate",
                "otherClauses": "GROUP BY e.Name, e.TaxId ORDER BY TotalVendas DESC"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SqlQueryTestResponse"
                },
                "example": {
                  "fields": [
                    {
                      "name": "Cliente",
                      "caption": "Cliente",
                      "fieldType": "String",
                      "entityType": null,
                      "entityLink": null,
                      "area": 1,
                      "formatting": null,
                      "isVisible": true
                    },
                    {
                      "name": "TotalVendas",
                      "caption": "TotalVendas",
                      "fieldType": "Number",
                      "entityType": null,
                      "entityLink": null,
                      "area": 2,
                      "formatting": "#,##0.00",
                      "isVisible": true
                    }
                  ],
                  "parameters": [
                    {
                      "name": "@initialDate",
                      "caption": "@initialDate",
                      "parameterType": "Date",
                      "entityType": null,
                      "defaultValue": null,
                      "query": null,
                      "defaultValueType": 0,
                      "availableValueType": 0,
                      "availableValuesList": []
                    },
                    {
                      "name": "@finalDate",
                      "caption": "@finalDate",
                      "parameterType": "Date",
                      "entityType": null,
                      "defaultValue": null,
                      "query": null,
                      "defaultValueType": 0,
                      "availableValueType": 0,
                      "availableValuesList": []
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SqlQueryTestResponse"
                },
                "example": {
                  "fields": [
                    {
                      "name": "Cliente",
                      "caption": "Cliente",
                      "fieldType": "String",
                      "entityType": null,
                      "entityLink": null,
                      "area": 1,
                      "formatting": null,
                      "isVisible": true
                    },
                    {
                      "name": "TotalVendas",
                      "caption": "TotalVendas",
                      "fieldType": "Number",
                      "entityType": null,
                      "entityLink": null,
                      "area": 2,
                      "formatting": "#,##0.00",
                      "isVisible": true
                    }
                  ],
                  "parameters": [
                    {
                      "name": "@initialDate",
                      "caption": "@initialDate",
                      "parameterType": "Date",
                      "entityType": null,
                      "defaultValue": null,
                      "query": null,
                      "defaultValueType": 0,
                      "availableValueType": 0,
                      "availableValuesList": []
                    },
                    {
                      "name": "@finalDate",
                      "caption": "@finalDate",
                      "parameterType": "Date",
                      "entityType": null,
                      "defaultValue": null,
                      "query": null,
                      "defaultValueType": 0,
                      "availableValueType": 0,
                      "availableValuesList": []
                    }
                  ]
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SqlQueryTestResponse"
                },
                "example": {
                  "fields": [
                    {
                      "name": "Cliente",
                      "caption": "Cliente",
                      "fieldType": "String",
                      "entityType": null,
                      "entityLink": null,
                      "area": 1,
                      "formatting": null,
                      "isVisible": true
                    },
                    {
                      "name": "TotalVendas",
                      "caption": "TotalVendas",
                      "fieldType": "Number",
                      "entityType": null,
                      "entityLink": null,
                      "area": 2,
                      "formatting": "#,##0.00",
                      "isVisible": true
                    }
                  ],
                  "parameters": [
                    {
                      "name": "@initialDate",
                      "caption": "@initialDate",
                      "parameterType": "Date",
                      "entityType": null,
                      "defaultValue": null,
                      "query": null,
                      "defaultValueType": 0,
                      "availableValueType": 0,
                      "availableValuesList": []
                    },
                    {
                      "name": "@finalDate",
                      "caption": "@finalDate",
                      "parameterType": "Date",
                      "entityType": null,
                      "defaultValue": null,
                      "query": null,
                      "defaultValueType": 0,
                      "availableValueType": 0,
                      "availableValuesList": []
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/gateway/report-parameter-configs/{reportId}": {
      "post": {
        "tags": [
          "ReportParameterConfigs"
        ],
        "summary": "Saves the parameter configuration for a specific report (whether dynamic or standard).",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "Unique identifier of the report to which the parameters will be associated.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "description": "The report parameter configuration data to be saved.",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportParametersConfigRequestDTO"
              },
              "example": {
                "configs": [
                  {
                    "name": "@initialDate",
                    "parameterType": "Date",
                    "value": "2025-01-01",
                    "defaultValueType": 1,
                    "dateTimeFunction": 0
                  },
                  {
                    "name": "@finalDate",
                    "parameterType": "Date",
                    "value": "2025-12-31",
                    "defaultValueType": 2,
                    "dateTimeFunction": 13
                  },
                  {
                    "name": "@warehouseId",
                    "parameterType": "Number",
                    "value": 1,
                    "defaultValueType": 1,
                    "dateTimeFunction": 0
                  }
                ]
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/ReportParametersConfigRequestDTO"
              },
              "example": {
                "configs": [
                  {
                    "name": "@initialDate",
                    "parameterType": "Date",
                    "value": "2025-01-01",
                    "defaultValueType": 1,
                    "dateTimeFunction": 0
                  },
                  {
                    "name": "@finalDate",
                    "parameterType": "Date",
                    "value": "2025-12-31",
                    "defaultValueType": 2,
                    "dateTimeFunction": 13
                  },
                  {
                    "name": "@warehouseId",
                    "parameterType": "Number",
                    "value": 1,
                    "defaultValueType": 1,
                    "dateTimeFunction": 0
                  }
                ]
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/ReportParametersConfigRequestDTO"
              },
              "example": {
                "configs": [
                  {
                    "name": "@initialDate",
                    "parameterType": "Date",
                    "value": "2025-01-01",
                    "defaultValueType": 1,
                    "dateTimeFunction": 0
                  },
                  {
                    "name": "@finalDate",
                    "parameterType": "Date",
                    "value": "2025-12-31",
                    "defaultValueType": 2,
                    "dateTimeFunction": 13
                  },
                  {
                    "name": "@warehouseId",
                    "parameterType": "Number",
                    "value": 1,
                    "defaultValueType": 1,
                    "dateTimeFunction": 0
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ParameterResponseDTO"
                  }
                },
                "example": [
                  {
                    "value": "2025-01-01",
                    "paramName": "@initialDate",
                    "dateTimeFunctions": 0,
                    "defaultValueType": 1
                  },
                  {
                    "value": "2025-12-31",
                    "paramName": "@finalDate",
                    "dateTimeFunctions": 13,
                    "defaultValueType": 2
                  },
                  {
                    "value": "1",
                    "paramName": "@warehouseId",
                    "dateTimeFunctions": 0,
                    "defaultValueType": 1
                  }
                ]
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ParameterResponseDTO"
                  }
                },
                "example": [
                  {
                    "value": "2025-01-01",
                    "paramName": "@initialDate",
                    "dateTimeFunctions": 0,
                    "defaultValueType": 1
                  },
                  {
                    "value": "2025-12-31",
                    "paramName": "@finalDate",
                    "dateTimeFunctions": 13,
                    "defaultValueType": 2
                  },
                  {
                    "value": "1",
                    "paramName": "@warehouseId",
                    "dateTimeFunctions": 0,
                    "defaultValueType": 1
                  }
                ]
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ParameterResponseDTO"
                  }
                },
                "example": [
                  {
                    "value": "2025-01-01",
                    "paramName": "@initialDate",
                    "dateTimeFunctions": 0,
                    "defaultValueType": 1
                  },
                  {
                    "value": "2025-12-31",
                    "paramName": "@finalDate",
                    "dateTimeFunctions": 13,
                    "defaultValueType": 2
                  },
                  {
                    "value": "1",
                    "paramName": "@warehouseId",
                    "dateTimeFunctions": 0,
                    "defaultValueType": 1
                  }
                ]
              }
            }
          },
          "400": {
            "description": "Bad Request",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/gateway/reports": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Retrieves a list of all available standard reports.",
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ReportInfo"
                  }
                },
                "example": [
                  {
                    "guid": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
                    "name": "Vendas por Cliente"
                  },
                  {
                    "guid": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
                    "name": "Vendas por Artigo"
                  },
                  {
                    "guid": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
                    "name": "Movimentos de Stock"
                  },
                  {
                    "guid": "9f8b5c2e-3a1d-4f6e-b8c7-1d2e3f4a5b6c",
                    "name": "Conta Corrente"
                  },
                  {
                    "guid": "a3f4b5c6-7d8e-9f01-2345-6789abcdef01",
                    "name": "Contabilidade por Série"
                  }
                ]
              },
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ReportInfo"
                  }
                },
                "example": [
                  {
                    "guid": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
                    "name": "Vendas por Cliente"
                  },
                  {
                    "guid": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
                    "name": "Vendas por Artigo"
                  },
                  {
                    "guid": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
                    "name": "Movimentos de Stock"
                  },
                  {
                    "guid": "9f8b5c2e-3a1d-4f6e-b8c7-1d2e3f4a5b6c",
                    "name": "Conta Corrente"
                  },
                  {
                    "guid": "a3f4b5c6-7d8e-9f01-2345-6789abcdef01",
                    "name": "Contabilidade por Série"
                  }
                ]
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/ReportInfo"
                  }
                },
                "example": [
                  {
                    "guid": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
                    "name": "Vendas por Cliente"
                  },
                  {
                    "guid": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
                    "name": "Vendas por Artigo"
                  },
                  {
                    "guid": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
                    "name": "Movimentos de Stock"
                  },
                  {
                    "guid": "9f8b5c2e-3a1d-4f6e-b8c7-1d2e3f4a5b6c",
                    "name": "Conta Corrente"
                  },
                  {
                    "guid": "a3f4b5c6-7d8e-9f01-2345-6789abcdef01",
                    "name": "Contabilidade por Série"
                  }
                ]
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/gateway/reports/{reportId}": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Retrieves data for a specific standard report based on provided parameters.",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "The unique identifier of the report.",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "jsonParameters",
            "in": "query",
            "description": "A JSON object (serialized and URL-encoded) containing the parameters required by the report.\n\n\n<b>Notes:</b><list type=\"bullet\"><item><description>Each key must match the `paramHolder` value returned by `GET /reports/{reportId}/info` (usually prefixed with `@`).</description></item><item><description>The value must correspond to the expected `parameterType` (date, string, number, boolean, or option key from `valueList`).</description></item><item><description>If a parameter is optional and omitted, the report will use its default value.</description></item></list>\n<b>Example JSON (before URL-encode):</b>```\n{\n  \"@initialDate\": \"2025-07-24\",\n  \"@finalDate\": \"2025-09-24\",\n  \"@initialCustomer\": \"\",\n  \"@finalCustomer\": \"ZZZZZZZZZZZZZZZZZZZZZZZZZ\",\n  \"@optionId\": 0\n}\n```",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectResultReport"
                },
                "example": {
                  "count": 3,
                  "value": [
                    {
                      "CustomerName": "Empresa ABC, Lda.",
                      "TotalAmount": 15230.5,
                      "DocumentCount": 42
                    },
                    {
                      "CustomerName": "Restaurante O Manel",
                      "TotalAmount": 8750,
                      "DocumentCount": 28
                    },
                    {
                      "CustomerName": "Supermercado Central",
                      "TotalAmount": 5420.75,
                      "DocumentCount": 15
                    }
                  ],
                  "summaryData": {
                    "icon": "chart-bar",
                    "header": "Resumo de Vendas",
                    "isFullWidth": true,
                    "sections": [
                      {
                        "title": "Totais",
                        "items": [
                          {
                            "label": "Total Vendas",
                            "format": "#,##0.00 €",
                            "value": 29401.25,
                            "addSuffix": false
                          },
                          {
                            "label": "Nº Documentos",
                            "format": null,
                            "value": 85,
                            "addSuffix": false
                          }
                        ]
                      }
                    ]
                  },
                  "additionalData": null
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectResultReport"
                },
                "example": {
                  "count": 3,
                  "value": [
                    {
                      "CustomerName": "Empresa ABC, Lda.",
                      "TotalAmount": 15230.5,
                      "DocumentCount": 42
                    },
                    {
                      "CustomerName": "Restaurante O Manel",
                      "TotalAmount": 8750,
                      "DocumentCount": 28
                    },
                    {
                      "CustomerName": "Supermercado Central",
                      "TotalAmount": 5420.75,
                      "DocumentCount": 15
                    }
                  ],
                  "summaryData": {
                    "icon": "chart-bar",
                    "header": "Resumo de Vendas",
                    "isFullWidth": true,
                    "sections": [
                      {
                        "title": "Totais",
                        "items": [
                          {
                            "label": "Total Vendas",
                            "format": "#,##0.00 €",
                            "value": 29401.25,
                            "addSuffix": false
                          },
                          {
                            "label": "Nº Documentos",
                            "format": null,
                            "value": 85,
                            "addSuffix": false
                          }
                        ]
                      }
                    ]
                  },
                  "additionalData": null
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectResultReport"
                },
                "example": {
                  "count": 3,
                  "value": [
                    {
                      "CustomerName": "Empresa ABC, Lda.",
                      "TotalAmount": 15230.5,
                      "DocumentCount": 42
                    },
                    {
                      "CustomerName": "Restaurante O Manel",
                      "TotalAmount": 8750,
                      "DocumentCount": 28
                    },
                    {
                      "CustomerName": "Supermercado Central",
                      "TotalAmount": 5420.75,
                      "DocumentCount": 15
                    }
                  ],
                  "summaryData": {
                    "icon": "chart-bar",
                    "header": "Resumo de Vendas",
                    "isFullWidth": true,
                    "sections": [
                      {
                        "title": "Totais",
                        "items": [
                          {
                            "label": "Total Vendas",
                            "format": "#,##0.00 €",
                            "value": 29401.25,
                            "addSuffix": false
                          },
                          {
                            "label": "Nº Documentos",
                            "format": null,
                            "value": 85,
                            "addSuffix": false
                          }
                        ]
                      }
                    ]
                  },
                  "additionalData": null
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    },
    "/gateway/reports/{reportId}/info": {
      "get": {
        "tags": [
          "Reports"
        ],
        "summary": "Retrieves the configuration for a specific standard report.",
        "parameters": [
          {
            "name": "reportId",
            "in": "path",
            "description": "The ID of the report.",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/SimpleReportConfig"
                },
                "example": {
                  "reportId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
                  "title": "Vendas por Cliente",
                  "keyExpr": null,
                  "parentIdExpr": null,
                  "showMasterDetail": false,
                  "masterDetailConfig": null,
                  "columns": [
                    {
                      "dataField": "CustomerName",
                      "displayName": "Cliente",
                      "dataType": "String"
                    },
                    {
                      "dataField": "TotalAmount",
                      "displayName": "Total",
                      "dataType": "Number"
                    },
                    {
                      "dataField": "DocumentCount",
                      "displayName": "Nº Documentos",
                      "dataType": "Number"
                    }
                  ],
                  "parameters": [
                    {
                      "displayName": "Data Inicial",
                      "description": "Data de início do período",
                      "value": "2025-01-01",
                      "paramHolder": "@initialDate",
                      "viewType": 7,
                      "group": 0,
                      "entityTypeValue": null,
                      "valueList": null
                    },
                    {
                      "displayName": "Data Final",
                      "description": "Data de fim do período",
                      "value": "2025-12-31",
                      "paramHolder": "@finalDate",
                      "viewType": 7,
                      "group": 0,
                      "entityTypeValue": null,
                      "valueList": null
                    }
                  ]
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimpleReportConfig"
                },
                "example": {
                  "reportId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
                  "title": "Vendas por Cliente",
                  "keyExpr": null,
                  "parentIdExpr": null,
                  "showMasterDetail": false,
                  "masterDetailConfig": null,
                  "columns": [
                    {
                      "dataField": "CustomerName",
                      "displayName": "Cliente",
                      "dataType": "String"
                    },
                    {
                      "dataField": "TotalAmount",
                      "displayName": "Total",
                      "dataType": "Number"
                    },
                    {
                      "dataField": "DocumentCount",
                      "displayName": "Nº Documentos",
                      "dataType": "Number"
                    }
                  ],
                  "parameters": [
                    {
                      "displayName": "Data Inicial",
                      "description": "Data de início do período",
                      "value": "2025-01-01",
                      "paramHolder": "@initialDate",
                      "viewType": 7,
                      "group": 0,
                      "entityTypeValue": null,
                      "valueList": null
                    },
                    {
                      "displayName": "Data Final",
                      "description": "Data de fim do período",
                      "value": "2025-12-31",
                      "paramHolder": "@finalDate",
                      "viewType": 7,
                      "group": 0,
                      "entityTypeValue": null,
                      "valueList": null
                    }
                  ]
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/SimpleReportConfig"
                },
                "example": {
                  "reportId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
                  "title": "Vendas por Cliente",
                  "keyExpr": null,
                  "parentIdExpr": null,
                  "showMasterDetail": false,
                  "masterDetailConfig": null,
                  "columns": [
                    {
                      "dataField": "CustomerName",
                      "displayName": "Cliente",
                      "dataType": "String"
                    },
                    {
                      "dataField": "TotalAmount",
                      "displayName": "Total",
                      "dataType": "Number"
                    },
                    {
                      "dataField": "DocumentCount",
                      "displayName": "Nº Documentos",
                      "dataType": "Number"
                    }
                  ],
                  "parameters": [
                    {
                      "displayName": "Data Inicial",
                      "description": "Data de início do período",
                      "value": "2025-01-01",
                      "paramHolder": "@initialDate",
                      "viewType": 7,
                      "group": 0,
                      "entityTypeValue": null,
                      "valueList": null
                    },
                    {
                      "displayName": "Data Final",
                      "description": "Data de fim do período",
                      "value": "2025-12-31",
                      "paramHolder": "@finalDate",
                      "viewType": 7,
                      "group": 0,
                      "entityTypeValue": null,
                      "valueList": null
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "Unauthorized",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ProblemDetails"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "DataSection": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "description": "Gets or sets the title of the data section.",
            "nullable": true
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Item"
            },
            "description": "Gets or sets the list of items in this section.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents a section of summary data containing a title and a list of items."
      },
      "DateTimeFunctions": {
        "enum": [
          1,
          2,
          3,
          4,
          5,
          6,
          7,
          8,
          9,
          10,
          11,
          12,
          13,
          14,
          15,
          16,
          17,
          18,
          19,
          20,
          21,
          22
        ],
        "type": "integer",
        "format": "int32"
      },
      "DiagramType": {
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5
        ],
        "type": "integer",
        "format": "int32"
      },
      "Disabled": {
        "type": "object",
        "properties": {
          "isDisabled": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "DynamicChartConfig": {
        "type": "object",
        "properties": {
          "chartTitle": {
            "type": "string",
            "description": "Gets or sets the title displayed on the chart.",
            "nullable": true
          },
          "argument": {
            "type": "string",
            "description": "Gets or sets the data field used as the argument (X-axis) of the chart.",
            "nullable": true
          },
          "selectedSeries": {
            "$ref": "#/components/schemas/SeriesType"
          },
          "selectedDiagram": {
            "$ref": "#/components/schemas/DiagramType"
          },
          "selectedPalette": {
            "$ref": "#/components/schemas/PaletteName"
          },
          "serieMember": {
            "type": "string",
            "description": "Gets or sets the data field used to split data into multiple series.",
            "nullable": true
          },
          "value": {
            "type": "string",
            "description": "Gets or sets the data field used as the value (Y-axis) of the chart.",
            "nullable": true
          },
          "animate": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether the chart should be animated."
          },
          "showLegend": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether the chart legend is visible."
          },
          "showSeriesLegend": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether the series legend labels are visible."
          },
          "dynamicReportGuid": {
            "type": "string",
            "description": "Gets or sets the GUID of the associated dynamic report used as the data source.",
            "nullable": true
          },
          "parameters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportParameterDetail"
            },
            "description": "Gets or sets the parameters required by the dynamic report.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents the configuration for a dynamic chart report, including visual settings and data bindings."
      },
      "DynamicChartDataDTO": {
        "required": [
          "description",
          "name",
          "selectedDynamicReportGuid"
        ],
        "type": "object",
        "properties": {
          "guid": {
            "type": "string",
            "description": "Gets or sets the unique identifier (GUID) of the dynamic chart report.",
            "nullable": true
          },
          "name": {
            "maxLength": 25,
            "minLength": 1,
            "type": "string",
            "description": "Gets or sets the short name of the chart report. Required. Max length: 25."
          },
          "description": {
            "maxLength": 250,
            "minLength": 1,
            "type": "string",
            "description": "Gets or sets the description of the chart report. Required. Max length: 250."
          },
          "addToRibbon": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether this chart should be added to the ribbon menu."
          },
          "selectedDynamicReportGuid": {
            "minLength": 1,
            "type": "string",
            "description": "Gets or sets the GUID of the dynamic report used as the data source. Required."
          },
          "permissionType": {
            "type": "integer",
            "description": "Gets or sets the permission type (e.g., AllUsers, CurrentUser, UserGroups).",
            "format": "int32"
          },
          "userId": {
            "type": "integer",
            "description": "Gets or sets the user identifier for user-specific permission.",
            "format": "int32",
            "nullable": true
          },
          "permissionGroupsId": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Gets or sets the list of user group identifiers that have access to this chart.",
            "nullable": true
          },
          "settingsEntity": {
            "$ref": "#/components/schemas/DynamicChartSettingsDTO"
          }
        },
        "additionalProperties": false,
        "description": "Represents the data transfer object for creating or updating a dynamic chart report."
      },
      "DynamicChartSettingsDTO": {
        "type": "object",
        "properties": {
          "chartTitle": {
            "type": "string",
            "description": "Gets or sets the title displayed on the chart.",
            "nullable": true
          },
          "argument": {
            "type": "string",
            "description": "Gets or sets the data field used as the argument (X-axis) of the chart.",
            "nullable": true
          },
          "selectedSeries": {
            "$ref": "#/components/schemas/SeriesType"
          },
          "selectedDiagram": {
            "$ref": "#/components/schemas/DiagramType"
          },
          "selectedPalette": {
            "$ref": "#/components/schemas/PaletteName"
          },
          "serieMember": {
            "type": "string",
            "description": "Gets or sets the data field used to split data into multiple series.",
            "nullable": true
          },
          "value": {
            "type": "string",
            "description": "Gets or sets the data field used as the value (Y-axis) of the chart.",
            "nullable": true
          },
          "animate": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether the chart should be animated."
          },
          "showLegend": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether the chart legend is visible."
          },
          "showSeriesLegend": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether the series legend labels are visible."
          }
        },
        "additionalProperties": false,
        "description": "Represents the visual and behavioral settings for a dynamic chart report."
      },
      "DynamicReportDataDTO": {
        "required": [
          "description",
          "fields",
          "name",
          "query"
        ],
        "type": "object",
        "properties": {
          "guid": {
            "type": "string",
            "description": "Gets or sets the unique identifier (GUID) of the dynamic report.",
            "nullable": true
          },
          "name": {
            "maxLength": 25,
            "minLength": 1,
            "type": "string",
            "description": "Gets or sets the short name of the dynamic report. Required. Max length: 25."
          },
          "description": {
            "maxLength": 250,
            "minLength": 1,
            "type": "string",
            "description": "Gets or sets the description of the dynamic report. Required. Max length: 250."
          },
          "query": {
            "$ref": "#/components/schemas/SqlQueryDTO"
          },
          "parameters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DynamicReportParameterDTO"
            },
            "description": "Gets or sets the list of parameters for the report query.",
            "nullable": true
          },
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DynamicReportFieldDTO"
            },
            "description": "Gets or sets the list of fields (columns) exposed by the report. Required."
          },
          "permissionType": {
            "type": "integer",
            "description": "Gets or sets the permission type (e.g., AllUsers, CurrentUser, UserGroups).",
            "format": "int32"
          },
          "reportType": {
            "type": "integer",
            "description": "Gets or sets the report type (e.g., DynamicReport, DynamicPivotReport).",
            "format": "int32"
          },
          "isPivotReport": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether this report uses a pivot table layout."
          },
          "dataAccess": {
            "type": "string",
            "description": "Gets or sets the data access configuration string.",
            "nullable": true
          },
          "addToRibbon": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether this report should be added to the ribbon menu."
          },
          "showInPos": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether this report should be shown in POS terminals."
          },
          "userId": {
            "type": "integer",
            "description": "Gets or sets the user identifier for user-specific permission.",
            "format": "int32"
          },
          "permissionGroupsId": {
            "type": "array",
            "items": {
              "type": "integer",
              "format": "int32"
            },
            "description": "Gets or sets the list of user group identifiers that have access to this report.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents the data transfer object for creating or updating a dynamic report."
      },
      "DynamicReportFieldDTO": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Gets or sets the name of the field (must match a column returned by the SQL query).",
            "nullable": true
          },
          "caption": {
            "type": "string",
            "description": "Gets or sets the display caption for the field.",
            "nullable": true
          },
          "fieldType": {
            "type": "string",
            "description": "Gets or sets the data type of the field (e.g., \"String\", \"Number\", \"Date\").",
            "nullable": true
          },
          "entityType": {
            "type": "string",
            "description": "Gets or sets the entity type associated with this field for entity link navigation.",
            "nullable": true
          },
          "entityLink": {
            "description": "Gets or sets the entity link configuration for navigating to related entities.",
            "nullable": true
          },
          "area": {
            "$ref": "#/components/schemas/PivotFieldArea"
          },
          "formatting": {
            "type": "string",
            "description": "Gets or sets the formatting string applied to the field values.",
            "nullable": true
          },
          "isVisible": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether the field is visible in the report output."
          }
        },
        "additionalProperties": false,
        "description": "Represents a field (column) definition in a dynamic report."
      },
      "DynamicReportParameterDTO": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Gets or sets the name of the parameter (used as the placeholder in the SQL query).",
            "nullable": true
          },
          "caption": {
            "type": "string",
            "description": "Gets or sets the display caption for the parameter.",
            "nullable": true
          },
          "parameterType": {
            "type": "string",
            "description": "Gets or sets the data type of the parameter (e.g., \"String\", \"Date\", \"Number\").",
            "nullable": true
          },
          "entityType": {
            "type": "string",
            "description": "Gets or sets the entity type associated with this parameter for lookup functionality.",
            "nullable": true
          },
          "defaultValue": {
            "description": "Gets or sets the default value of the parameter.",
            "nullable": true
          },
          "query": {
            "type": "string",
            "description": "Gets or sets the SQL query used to populate available values for this parameter.",
            "nullable": true
          },
          "defaultValueType": {
            "$ref": "#/components/schemas/ParamDefaultValue"
          },
          "availableValueType": {
            "$ref": "#/components/schemas/ParamAvailableValue"
          },
          "availableValuesList": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ParamListValue"
            },
            "description": "Gets or sets the list of available values when the parameter uses a predefined list.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents a parameter definition for a dynamic report query."
      },
      "ExecuteQueryResponse": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "description": "Gets or sets the total number of rows returned by the query.",
            "format": "int32"
          },
          "value": {
            "type": "array",
            "items": {},
            "description": "Gets or sets the list of data rows returned by the query.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents the response from executing a SQL query, containing the result count and data rows."
      },
      "GenericSummaryData": {
        "type": "object",
        "properties": {
          "icon": {
            "type": "string",
            "description": "Gets or sets the icon identifier for the summary header.",
            "nullable": true
          },
          "header": {
            "type": "string",
            "description": "Gets or sets the header text of the summary.",
            "nullable": true
          },
          "isFullWidth": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether the summary should span the full width."
          },
          "sections": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DataSection"
            },
            "description": "Gets or sets the list of data sections containing the summary details.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents the generic summary data displayed alongside a report result, containing header info and data sections."
      },
      "Item": {
        "type": "object",
        "properties": {
          "label": {
            "type": "string",
            "description": "Gets or sets the label/name of the item.",
            "nullable": true
          },
          "format": {
            "type": "string",
            "description": "Gets or sets the format string applied to the item value.",
            "nullable": true
          },
          "value": {
            "description": "Gets or sets the value of the item.",
            "nullable": true
          },
          "addSuffix": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether a suffix should be appended to the value."
          }
        },
        "additionalProperties": false,
        "description": "Represents an individual item within a summary data section."
      },
      "MasterDetailConfigDTO": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "description": "Gets or sets the description of the detail section.",
            "nullable": true
          },
          "keyExpr": {
            "type": "string",
            "description": "Gets or sets the key expression used to link master and detail records.",
            "nullable": true
          },
          "columnsConfig": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportColumn"
            },
            "description": "Gets or sets the column configurations for the detail grid.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents the configuration for a master-detail relationship in a report."
      },
      "ObjectResultReport": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "description": "Gets or sets the total number of rows in the report result.",
            "format": "int32"
          },
          "value": {
            "type": "array",
            "items": {},
            "description": "Gets or sets the collection of data rows returned by the report.",
            "nullable": true
          },
          "summaryData": {
            "$ref": "#/components/schemas/GenericSummaryData"
          },
          "additionalData": {
            "description": "Gets or sets additional data returned with the report result.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents the result of executing a report, containing data rows, count and optional summary/additional data."
      },
      "PaletteName": {
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5,
          6,
          7,
          8
        ],
        "type": "integer",
        "format": "int32"
      },
      "ParamAvailableValue": {
        "enum": [
          0,
          1,
          2
        ],
        "type": "integer",
        "format": "int32"
      },
      "ParamDefaultValue": {
        "enum": [
          0,
          1,
          2
        ],
        "type": "integer",
        "format": "int32"
      },
      "ParamListValue": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "description": "Gets or sets the display description of the option.",
            "nullable": true
          },
          "value": {
            "description": "Gets or sets the value of the option.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents a key-value pair used as an available option in a parameter's value list."
      },
      "ParameterResponseDTO": {
        "type": "object",
        "properties": {
          "value": {
            "type": "string",
            "description": "Gets or sets the saved value of the parameter.",
            "nullable": true
          },
          "paramName": {
            "type": "string",
            "description": "Gets or sets the name of the parameter.",
            "nullable": true
          },
          "dateTimeFunctions": {
            "$ref": "#/components/schemas/DateTimeFunctions"
          },
          "defaultValueType": {
            "$ref": "#/components/schemas/ParamDefaultValue"
          }
        },
        "additionalProperties": false,
        "description": "Represents the response for a saved report parameter configuration."
      },
      "ParameterViewType": {
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5,
          6,
          7,
          8
        ],
        "type": "integer",
        "format": "int32"
      },
      "PivotFieldArea": {
        "enum": [
          0,
          1,
          2,
          3
        ],
        "type": "integer",
        "format": "int32"
      },
      "ProblemDetails": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "title": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "detail": {
            "type": "string",
            "nullable": true
          },
          "instance": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": {}
      },
      "ReportColumn": {
        "type": "object",
        "properties": {
          "dataField": {
            "type": "string",
            "description": "Gets or sets the data field name bound to this column.",
            "nullable": true
          },
          "displayName": {
            "type": "string",
            "description": "Gets or sets the display name (header) of the column.",
            "nullable": true
          },
          "dataType": {
            "type": "string",
            "description": "Gets or sets the data type of the column (e.g., \"String\", \"Number\", \"Date\").",
            "nullable": true
          },
          "visible": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether the column is visible."
          },
          "link": {
            "type": "string",
            "description": "Gets or sets the entity link URL pattern for navigating to related entities.",
            "nullable": true
          },
          "alignment": {
            "type": "string",
            "description": "Gets or sets the text alignment of the column (e.g., \"left\", \"center\", \"right\").",
            "nullable": true
          },
          "width": {
            "type": "integer",
            "description": "Gets or sets the fixed width of the column in pixels.",
            "format": "int32",
            "nullable": true
          },
          "fixed": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether the column is fixed (pinned) in position."
          },
          "fixedPosition": {
            "type": "string",
            "description": "Gets or sets the fixed position of the column (e.g., \"left\", \"right\").",
            "nullable": true
          },
          "allowHiding": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether the user can hide this column."
          },
          "allowSorting": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether the user can sort by this column."
          },
          "translationKey": {
            "type": "string",
            "description": "Gets or sets the translation key used for localizing the column header.",
            "nullable": true
          },
          "formatConfigField": {
            "type": "string",
            "description": "Gets or sets the format configuration field name for custom formatting.",
            "nullable": true
          },
          "format": {
            "description": "Gets or sets the format configuration object applied to the column values.",
            "nullable": true
          },
          "visibleIndex": {
            "type": "integer",
            "description": "Gets or sets the visible index controlling the display order of the column.",
            "format": "int32"
          }
        },
        "additionalProperties": false,
        "description": "Represents a column definition in a report grid, including display, formatting and behavior settings."
      },
      "ReportConfig": {
        "type": "object",
        "properties": {
          "reportId": {
            "type": "string",
            "description": "Gets or sets the unique identifier of the report.",
            "nullable": true
          },
          "title": {
            "type": "string",
            "description": "Gets or sets the display title of the report.",
            "nullable": true
          },
          "columns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportColumn"
            },
            "description": "Gets or sets the column definitions for the report grid.",
            "nullable": true
          },
          "keyExpr": {
            "type": "string",
            "description": "Gets or sets the key expression used for hierarchical or tree-structured data.",
            "nullable": true
          },
          "parentIdExpr": {
            "type": "string",
            "description": "Gets or sets the parent ID expression for tree-structured reports.",
            "nullable": true
          },
          "parameters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportParameterDetail"
            },
            "description": "Gets or sets the parameter definitions required to execute the report.",
            "nullable": true
          },
          "hasSummary": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether the report includes a summary section."
          },
          "showMasterDetail": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether the report has a master-detail layout."
          },
          "masterDetailConfig": {
            "$ref": "#/components/schemas/MasterDetailConfigDTO"
          },
          "additionalData": {
            "description": "Gets or sets additional data returned with the report configuration.",
            "nullable": true
          },
          "query": {
            "type": "string",
            "description": "Gets or sets the SQL query string used by the report.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents the full configuration of a report, including columns, parameters, master-detail settings and query."
      },
      "ReportInfo": {
        "type": "object",
        "properties": {
          "guid": {
            "type": "string",
            "description": "Gets or sets the unique identifier (GUID) of the report.",
            "nullable": true
          },
          "name": {
            "type": "string",
            "description": "Gets or sets the display name of the report.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents basic identification information for a report."
      },
      "ReportParameterConfigDTO": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Gets or sets the name of the parameter.",
            "nullable": true
          },
          "parameterType": {
            "type": "string",
            "description": "Gets or sets the data type of the parameter (e.g., \"String\", \"Date\", \"Number\").",
            "nullable": true
          },
          "value": {
            "description": "Gets or sets the current value of the parameter.",
            "nullable": true
          },
          "defaultValueType": {
            "$ref": "#/components/schemas/ParamDefaultValue"
          },
          "dateTimeFunction": {
            "$ref": "#/components/schemas/DateTimeFunctions"
          }
        },
        "additionalProperties": false,
        "description": "Represents a single report parameter configuration entry to be saved."
      },
      "ReportParameterDetail": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "Gets or sets the internal name of the parameter.",
            "nullable": true
          },
          "caption": {
            "type": "string",
            "description": "Gets or sets the display caption of the parameter.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Gets or sets the description/help text of the parameter.",
            "nullable": true
          },
          "value": {
            "type": "string",
            "description": "Gets or sets the current value of the parameter as a string.",
            "nullable": true
          },
          "defaultValueType": {
            "$ref": "#/components/schemas/ParamDefaultValue"
          },
          "dateTimeFunctions": {
            "$ref": "#/components/schemas/DateTimeFunctions"
          },
          "type": {
            "type": "string",
            "description": "Gets or sets the data type name of the parameter (e.g., \"String\", \"Date\", \"Int32\").",
            "nullable": true
          },
          "viewType": {
            "$ref": "#/components/schemas/ParameterViewType"
          },
          "entityTypeValue": {
            "type": "string",
            "description": "Gets or sets the entity type value used for lookup-based parameters.",
            "nullable": true
          },
          "paramHolder": {
            "type": "string",
            "description": "Gets or sets the parameter placeholder name used in the SQL query.",
            "nullable": true
          },
          "required": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether the parameter is required."
          },
          "filter": {
            "description": "Gets or sets the filter configuration for the parameter.",
            "nullable": true
          },
          "group": {
            "type": "integer",
            "description": "Gets or sets the group index for grouping related parameters together.",
            "format": "int32"
          },
          "valueList": {
            "description": "Gets or sets the list of available values for combo box or list box parameters.",
            "nullable": true
          },
          "isDisabled": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether the parameter is disabled (read-only)."
          },
          "isVisible": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether the parameter is visible in the UI."
          },
          "query": {
            "type": "string",
            "description": "Gets or sets the SQL query used to populate available values dynamically.",
            "nullable": true
          },
          "handleVisibleParams": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "additionalProperties": {
                "$ref": "#/components/schemas/Visibility"
              }
            },
            "description": "Gets or sets the rules for dynamically controlling visibility of other parameters based on this parameter's value.",
            "nullable": true
          },
          "handleIsDisabledParams": {
            "type": "object",
            "additionalProperties": {
              "type": "object",
              "additionalProperties": {
                "$ref": "#/components/schemas/Disabled"
              }
            },
            "description": "Gets or sets the rules for dynamically controlling the disabled state of other parameters based on this parameter's value.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents the detailed definition of a report parameter, including its type, value, visibility and available options."
      },
      "ReportParametersConfigRequestDTO": {
        "type": "object",
        "properties": {
          "configs": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ReportParameterConfigDTO"
            },
            "description": "Gets or sets the list of parameter configurations to save.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents the request body for saving report parameter configurations."
      },
      "SeriesType": {
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5,
          6,
          7,
          8,
          9,
          10,
          11,
          12,
          13,
          14,
          15,
          16,
          17,
          18,
          19,
          20,
          21,
          22,
          23,
          24,
          25,
          26,
          27,
          28,
          29
        ],
        "type": "integer",
        "format": "int32"
      },
      "SimpleMasterDetailConfig": {
        "type": "object",
        "properties": {
          "description": {
            "type": "string",
            "description": "Gets or sets the description of the detail section.",
            "nullable": true
          },
          "keyExpr": {
            "type": "string",
            "description": "Gets or sets the key expression used to link master and detail records.",
            "nullable": true
          },
          "columnsConfig": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SimpleReportColumn"
            },
            "description": "Gets or sets the column configurations for the detail grid.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents a simplified master-detail configuration for third-party API consumers."
      },
      "SimpleReportColumn": {
        "type": "object",
        "properties": {
          "dataField": {
            "type": "string",
            "description": "Gets or sets the data field name of the column.",
            "nullable": true
          },
          "displayName": {
            "type": "string",
            "description": "Gets or sets the display name of the column.",
            "nullable": true
          },
          "dataType": {
            "type": "string",
            "description": "Gets or sets the data type of the column (e.g., \"String\", \"Number\", \"Date\").",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents a simplified column definition for third-party API consumers."
      },
      "SimpleReportConfig": {
        "type": "object",
        "properties": {
          "reportId": {
            "type": "string",
            "description": "Gets or sets the unique identifier of the report.",
            "nullable": true
          },
          "title": {
            "type": "string",
            "description": "Gets or sets the display title of the report.",
            "nullable": true
          },
          "keyExpr": {
            "type": "string",
            "description": "Gets or sets the key expression used for hierarchical or tree-structured data.",
            "nullable": true
          },
          "parentIdExpr": {
            "type": "string",
            "description": "Gets or sets the parent ID expression for tree-structured reports.",
            "nullable": true
          },
          "showMasterDetail": {
            "type": "boolean",
            "description": "Gets or sets a value indicating whether the report has a master-detail layout."
          },
          "masterDetailConfig": {
            "$ref": "#/components/schemas/SimpleMasterDetailConfig"
          },
          "columns": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SimpleReportColumn"
            },
            "description": "Gets or sets the simplified column definitions for the report.",
            "nullable": true
          },
          "parameters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/SimpleReportParameter"
            },
            "description": "Gets or sets the simplified parameter definitions required to execute the report.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Simplified report configuration intended for third-party API consumers.\nContains only the essential information needed to understand and execute a report."
      },
      "SimpleReportParameter": {
        "type": "object",
        "properties": {
          "displayName": {
            "type": "string",
            "description": "Gets or sets the display name of the parameter.",
            "nullable": true
          },
          "description": {
            "type": "string",
            "description": "Gets or sets the description/help text of the parameter.",
            "nullable": true
          },
          "value": {
            "type": "string",
            "description": "Gets or sets the current/default value of the parameter.",
            "nullable": true
          },
          "paramHolder": {
            "type": "string",
            "description": "Gets or sets the parameter placeholder name used in the SQL query.",
            "nullable": true
          },
          "viewType": {
            "$ref": "#/components/schemas/ParameterViewType"
          },
          "group": {
            "type": "integer",
            "description": "Gets or sets the group index for grouping related parameters together.",
            "format": "int32"
          },
          "entityTypeValue": {
            "type": "string",
            "description": "Gets or sets the entity type value used for lookup-based parameters.",
            "nullable": true
          },
          "valueList": {
            "description": "Gets or sets the list of available values for combo box or list box parameters.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents a simplified parameter definition for third-party API consumers."
      },
      "SqlQueryDTO": {
        "type": "object",
        "properties": {
          "sqlQuery": {
            "type": "string",
            "description": "Gets or sets the main SQL query statement (SELECT ... FROM ...).",
            "nullable": true
          },
          "whereClause": {
            "type": "string",
            "description": "Gets or sets the WHERE clause to filter the query results.",
            "nullable": true
          },
          "otherClauses": {
            "type": "string",
            "description": "Gets or sets additional SQL clauses (e.g., GROUP BY, ORDER BY, HAVING).",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents the SQL query components for a dynamic report."
      },
      "SqlQueryTestResponse": {
        "type": "object",
        "properties": {
          "fields": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DynamicReportFieldDTO"
            },
            "description": "Gets or sets the list of fields (columns) discovered from the query result set.",
            "nullable": true
          },
          "parameters": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/DynamicReportParameterDTO"
            },
            "description": "Gets or sets the list of parameters detected in the SQL query.",
            "nullable": true
          }
        },
        "additionalProperties": false,
        "description": "Represents the response from testing a SQL query, containing the discovered fields and parameters."
      },
      "Visibility": {
        "type": "object",
        "properties": {
          "isVisible": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "http",
        "description": "JWT Authorization header. Enter your token in the text input below.Example: \"abcdef\"",
        "scheme": "Bearer",
        "bearerFormat": "JWT"
      }
    }
  },
  "security": [
    {
      "Bearer": []
    }
  ]
}