{
  "openapi": "3.0.1",
  "info": {
    "title": "Fintegra API",
    "description": "Fintegra Backend API Services",
    "contact": {
      "name": "Fintegra Team"
    },
    "version": "v1"
  },
  "paths": {
    "/api/ai/financial/query": {
      "post": {
        "tags": [
          "AIFinancial"
        ],
        "summary": "AI Financial Query",
        "description": "Submit a natural language query about financial data. AI will automatically determine which data sources to use and provide intelligent analysis with insights and recommendations.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AIQueryRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AIQueryRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AIQueryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "AI analysis completed successfully",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AIQueryResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIQueryResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIQueryResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters"
          },
          "401": {
            "description": "User not authenticated"
          },
          "500": {
            "description": "Internal server error"
          }
        }
      }
    },
    "/api/ai/financial/executive-summary": {
      "get": {
        "tags": [
          "AIFinancial"
        ],
        "summary": "AI Executive Summary",
        "description": "Generate an AI-powered executive summary of financial performance with key metrics, trends, and recommendations.",
        "parameters": [
          {
            "name": "platform",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Executive summary generated successfully",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AIQueryResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIQueryResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIQueryResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters"
          },
          "401": {
            "description": "User not authenticated"
          }
        }
      }
    },
    "/api/ai/financial/health-analysis": {
      "get": {
        "tags": [
          "AIFinancial"
        ],
        "summary": "AI Financial Health Analysis",
        "description": "Perform comprehensive AI-powered financial health analysis including cash flow, profitability, and risk assessment.",
        "parameters": [
          {
            "name": "platform",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Financial health analysis completed",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AIQueryResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIQueryResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIQueryResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters"
          },
          "401": {
            "description": "User not authenticated"
          }
        }
      }
    },
    "/api/ai/financial/collection-priorities": {
      "get": {
        "tags": [
          "AIFinancial"
        ],
        "summary": "AI Collection Priorities",
        "description": "Generate AI-powered collection priorities and cash flow optimization recommendations based on accounts receivable analysis.",
        "parameters": [
          {
            "name": "platform",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Collection priorities generated successfully",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/AIQueryResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIQueryResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/AIQueryResponse"
                }
              }
            }
          },
          "400": {
            "description": "Invalid request parameters"
          },
          "401": {
            "description": "User not authenticated"
          }
        }
      }
    },
    "/api/ai/financial/available-functions": {
      "get": {
        "tags": [
          "AIFinancial"
        ],
        "summary": "Get Available AI Functions",
        "description": "Get the list of available AI functions and data sources for a specific platform.",
        "parameters": [
          {
            "name": "platform",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Available functions retrieved successfully"
          },
          "400": {
            "description": "Invalid platform"
          }
        }
      }
    },
    "/api/chat/attachments": {
      "post": {
        "tags": [
          "Attachments"
        ],
        "summary": "Upload a file to Google Drive for a specific conversation.\r\nReturns an AttachmentDto; include its Id in SendMessageDto.AttachmentIds to link it.",
        "parameters": [
          {
            "name": "conversationId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "file": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/chat/attachments/{attachmentId}": {
      "delete": {
        "tags": [
          "Attachments"
        ],
        "summary": "Delete a previously uploaded chat attachment.\r\nOnly the original uploader may delete.",
        "parameters": [
          {
            "name": "attachmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/conversations/{conversationId}/attachments": {
      "get": {
        "tags": [
          "Attachments"
        ],
        "summary": "List all attachments for a given conversation.\r\nUsed by the Files tab in ChatRightPanel.",
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/board/meetings": {
      "get": {
        "tags": [
          "BoardModule"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "BoardModule"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "Title": {
                    "type": "string"
                  },
                  "Date": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "Time": {
                    "type": "string"
                  },
                  "Location": {
                    "type": "string"
                  },
                  "MeetingLink": {
                    "type": "string"
                  },
                  "AgendaFile": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "Title": {
                  "style": "form"
                },
                "Date": {
                  "style": "form"
                },
                "Time": {
                  "style": "form"
                },
                "Location": {
                  "style": "form"
                },
                "MeetingLink": {
                  "style": "form"
                },
                "AgendaFile": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/board/resolutions": {
      "get": {
        "tags": [
          "BoardModule"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "BoardModule"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "Title": {
                    "type": "string"
                  },
                  "Meeting": {
                    "type": "string"
                  },
                  "Category": {
                    "type": "string"
                  },
                  "Date": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "File": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "Title": {
                  "style": "form"
                },
                "Meeting": {
                  "style": "form"
                },
                "Category": {
                  "style": "form"
                },
                "Date": {
                  "style": "form"
                },
                "File": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/board/approvals": {
      "get": {
        "tags": [
          "BoardModule"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "BoardModule"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "Title": {
                    "type": "string"
                  },
                  "Description": {
                    "type": "string"
                  },
                  "RequestedBy": {
                    "type": "string"
                  },
                  "Date": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "Priority": {
                    "type": "string"
                  },
                  "File": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "Title": {
                  "style": "form"
                },
                "Description": {
                  "style": "form"
                },
                "RequestedBy": {
                  "style": "form"
                },
                "Date": {
                  "style": "form"
                },
                "Priority": {
                  "style": "form"
                },
                "File": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/board/members": {
      "get": {
        "tags": [
          "BoardModule"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "BoardModule"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateMemberRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateMemberRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateMemberRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/board/documents": {
      "get": {
        "tags": [
          "BoardModule"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "BoardModule"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "File": {
                    "type": "string",
                    "format": "binary"
                  },
                  "MeetingName": {
                    "type": "string"
                  },
                  "UploadedBy": {
                    "type": "string"
                  }
                }
              },
              "encoding": {
                "File": {
                  "style": "form"
                },
                "MeetingName": {
                  "style": "form"
                },
                "UploadedBy": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/board/documents/{id}": {
      "delete": {
        "tags": [
          "BoardModule"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/board/meetings/{id}": {
      "delete": {
        "tags": [
          "BoardModule"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/board/members/{id}": {
      "delete": {
        "tags": [
          "BoardModule"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/board/resolutions/{id}": {
      "delete": {
        "tags": [
          "BoardModule"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/board/approvals/{id}": {
      "delete": {
        "tags": [
          "BoardModule"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/board/documents/{id}/download": {
      "get": {
        "tags": [
          "BoardModule"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/board/resolutions/{id}/download": {
      "get": {
        "tags": [
          "BoardModule"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/board/approvals/{id}/download": {
      "get": {
        "tags": [
          "BoardModule"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/board/meetings/{id}/download": {
      "get": {
        "tags": [
          "BoardModule"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/board/resolutions/{id}/status": {
      "patch": {
        "tags": [
          "BoardModule"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateStatusRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateStatusRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateStatusRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/board/approvals/{id}/status": {
      "patch": {
        "tags": [
          "BoardModule"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateStatusRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateStatusRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateStatusRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Bonds/{companyId}": {
      "post": {
        "tags": [
          "Bonds"
        ],
        "summary": "Create and save a new bond for a company",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BondCalculationRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/BondCalculationRequestDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/BondCalculationRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "tags": [
          "Bonds"
        ],
        "summary": "Get all bonds for a company",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Bonds/{companyId}/{bondId}": {
      "get": {
        "tags": [
          "Bonds"
        ],
        "summary": "Get a specific bond by ID",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "bondId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "Bonds"
        ],
        "summary": "Updates an existing bond's details",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "bondId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BondCalculationRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/BondCalculationRequestDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/BondCalculationRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Bonds"
        ],
        "summary": "Soft delete a bond",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "bondId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Companies": {
      "post": {
        "tags": [
          "Companies"
        ],
        "summary": "Create a new company under a firm",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCompanyDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCompanyDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCompanyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "Get all companies accessible by current user",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Companies/my": {
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "Get current user's companies with full integration context\r\nUsed by frontend for auto-routing after login/invite acceptance",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Companies/{id}": {
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "Get company by ID",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "Companies"
        ],
        "summary": "Update company details",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCompanyDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCompanyDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateCompanyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Companies/{id}/users": {
      "get": {
        "tags": [
          "Companies"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Companies"
        ],
        "summary": "Assign a user to a company",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignUserToCompanyDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AssignUserToCompanyDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AssignUserToCompanyDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Companies/{id}/integration": {
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "Get integration status for a company",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Companies/{id}/disconnect": {
      "post": {
        "tags": [
          "Companies"
        ],
        "summary": "Disconnect integration from a company",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Companies/{id}/connect/{platform}": {
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "Get authorization URL for connecting a company to a platform",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "platform",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Companies/{id}/members": {
      "get": {
        "tags": [
          "Companies"
        ],
        "summary": "Get all members of a specific company — used by the chat sidebar\r\nto populate the \"Direct Messages\" list with everyone in the company.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Conversations": {
      "get": {
        "tags": [
          "Conversations"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Conversations"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateConversationDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateConversationDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateConversationDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Conversations/{id}": {
      "get": {
        "tags": [
          "Conversations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Conversations/{id}/participants": {
      "post": {
        "tags": [
          "Conversations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddParticipantDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AddParticipantDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AddParticipantDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Conversations/{id}/participants/{targetUserId}": {
      "delete": {
        "tags": [
          "Conversations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "targetUserId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Conversations/{id}/mute": {
      "patch": {
        "tags": [
          "Conversations"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/MuteParticipantDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/MuteParticipantDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/MuteParticipantDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/dataroom/folders": {
      "get": {
        "tags": [
          "DataRoom"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "parentFolderId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "DataRoom"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFolderRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFolderRequestDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFolderRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/dataroom/folders/{folderId}": {
      "delete": {
        "tags": [
          "DataRoom"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "folderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/dataroom/folders/{folderId}/documents": {
      "get": {
        "tags": [
          "DataRoom"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "folderId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/dataroom/documents": {
      "post": {
        "tags": [
          "DataRoom"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "FolderId": {
                    "type": "string",
                    "format": "uuid"
                  },
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "FolderId": {
                  "style": "form"
                },
                "file": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/dataroom/documents/{documentId}/download": {
      "get": {
        "tags": [
          "DataRoom"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/dataroom/documents/{documentId}": {
      "delete": {
        "tags": [
          "DataRoom"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Favourites": {
      "get": {
        "tags": [
          "Favourites"
        ],
        "summary": "Get favourite report names for the current user, scoped to company/tenant.",
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Favourites"
        ],
        "summary": "Set (replace) favourite report names for the current user, scoped to company/tenant.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FavouriteRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/FavouriteRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/FavouriteRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Feedback": {
      "post": {
        "tags": [
          "Feedback"
        ],
        "summary": "Creates feedback from the logged-in user.\r\nFeedback Types:\r\n1 = BugReport\r\n2 = FeatureRequest\r\n3 = GeneralFeedback\r\n4 = SuggestionImprovement\r\n5 = Others",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FeedbackRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/FeedbackRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/FeedbackRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Feedback/ticket/{ticketId}": {
      "get": {
        "tags": [
          "Feedback"
        ],
        "summary": "Get feedback by ticket ID",
        "parameters": [
          {
            "name": "ticketId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Feedback/my-feedbacks": {
      "get": {
        "tags": [
          "Feedback"
        ],
        "summary": "Get all feedbacks for the current logged-in user",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Feedback/all": {
      "get": {
        "tags": [
          "Feedback"
        ],
        "summary": "Get all feedbacks (Admin only)",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Firms": {
      "post": {
        "tags": [
          "Firms"
        ],
        "summary": "Create a new firm (during onboarding)",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFirmDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFirmDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateFirmDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Firms/my": {
      "get": {
        "tags": [
          "Firms"
        ],
        "summary": "Get current user's firm",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Firms/{id}": {
      "get": {
        "tags": [
          "Firms"
        ],
        "summary": "Get firm by ID",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "Firms"
        ],
        "summary": "Update firm details",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateFirmDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateFirmDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateFirmDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Firms/{id}/users": {
      "get": {
        "tags": [
          "Firms"
        ],
        "summary": "Get all users in a firm",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/FixedAsset": {
      "get": {
        "tags": [
          "FixedAsset"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "firmId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "platform",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "FixedAsset"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "firmId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FixedAssetDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/FixedAssetDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/FixedAssetDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/FixedAsset/{id}": {
      "get": {
        "tags": [
          "FixedAsset"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "firmId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "platform",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "FixedAsset"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "firmId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/FixedAssetDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/FixedAssetDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/FixedAssetDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "FixedAsset"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "firmId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "platform",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/GoogleDrive/status": {
      "get": {
        "tags": [
          "GoogleDrive"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/GoogleDrive/connect": {
      "get": {
        "tags": [
          "GoogleDrive"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "returnUrl",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/GoogleDrive/disconnect": {
      "delete": {
        "tags": [
          "GoogleDrive"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/GoogleDrive/callback": {
      "get": {
        "tags": [
          "GoogleDrive"
        ],
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/HumanCapital/dashboard": {
      "get": {
        "tags": [
          "HumanCapital"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "period",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "ytd"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/HumanCapital/employees": {
      "get": {
        "tags": [
          "HumanCapital"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "dept",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "search",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "HumanCapital"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEmployeeDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEmployeeDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateEmployeeDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/HumanCapital/employees/{employeeId}": {
      "get": {
        "tags": [
          "HumanCapital"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "employeeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "HumanCapital"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "employeeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEmployeeDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEmployeeDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateEmployeeDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "HumanCapital"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "employeeId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/HumanCapital/hiring-tracker": {
      "get": {
        "tags": [
          "HumanCapital"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/HumanCapital/leave-entitlement": {
      "get": {
        "tags": [
          "HumanCapital"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/HumanCapital/gosi-summary": {
      "get": {
        "tags": [
          "HumanCapital"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/HumanCapital/employees/export": {
      "get": {
        "tags": [
          "HumanCapital"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/IntangibleAsset": {
      "get": {
        "tags": [
          "IntangibleAsset"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "firmId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "platform",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "IntangibleAsset"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "firmId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntangibleAssetDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/IntangibleAssetDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/IntangibleAssetDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/IntangibleAsset/{id}": {
      "get": {
        "tags": [
          "IntangibleAsset"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "firmId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "platform",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "IntangibleAsset"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "firmId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/IntangibleAssetDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/IntangibleAssetDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/IntangibleAssetDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "IntangibleAsset"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "firmId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "platform",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Invitations": {
      "post": {
        "tags": [
          "Invitations"
        ],
        "summary": "Create a new invitation (authenticated)",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInvitationDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInvitationDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInvitationDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Invitations/{token}": {
      "get": {
        "tags": [
          "Invitations"
        ],
        "summary": "Validate an invitation token (public endpoint)",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Invitations/{token}/accept": {
      "post": {
        "tags": [
          "Invitations"
        ],
        "summary": "Accept an invitation (authenticated)",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Invitations/{id}/revoke": {
      "post": {
        "tags": [
          "Invitations"
        ],
        "summary": "Revoke an invitation (authenticated)",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Invitations/firm/{firmId}": {
      "get": {
        "tags": [
          "Invitations"
        ],
        "summary": "List all invitations for a firm (authenticated)",
        "parameters": [
          {
            "name": "firmId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/LegalCompliance/documents": {
      "post": {
        "tags": [
          "LegalCompliance"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "DocumentType": {
                    "type": "string"
                  },
                  "Status": {
                    "type": "string"
                  },
                  "SignedDate": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "ExpiryDate": {
                    "type": "string",
                    "format": "date-time"
                  },
                  "Owner": {
                    "type": "string"
                  },
                  "Version": {
                    "type": "string"
                  },
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "DocumentType": {
                  "style": "form"
                },
                "Status": {
                  "style": "form"
                },
                "SignedDate": {
                  "style": "form"
                },
                "ExpiryDate": {
                  "style": "form"
                },
                "Owner": {
                  "style": "form"
                },
                "Version": {
                  "style": "form"
                },
                "file": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "tags": [
          "LegalCompliance"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/LegalCompliance/documents/{documentId}": {
      "get": {
        "tags": [
          "LegalCompliance"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "LegalCompliance"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/LegalCompliance/documents/{documentId}/download": {
      "get": {
        "tags": [
          "LegalCompliance"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "documentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/LegalCompliance/tasks": {
      "get": {
        "tags": [
          "LegalCompliance"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "LegalCompliance"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateComplianceTaskDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateComplianceTaskDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateComplianceTaskDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/LegalCompliance/tasks/{taskId}/status": {
      "patch": {
        "tags": [
          "LegalCompliance"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateComplianceTaskStatusDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateComplianceTaskStatusDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateComplianceTaskStatusDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/LegalCompliance/tasks/{taskId}": {
      "delete": {
        "tags": [
          "LegalCompliance"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "taskId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/LegalCompliance/policies": {
      "get": {
        "tags": [
          "LegalCompliance"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "LegalCompliance"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "multipart/form-data": {
              "schema": {
                "type": "object",
                "properties": {
                  "PolicyName": {
                    "type": "string"
                  },
                  "Category": {
                    "type": "string"
                  },
                  "Version": {
                    "type": "string"
                  },
                  "Owner": {
                    "type": "string"
                  },
                  "Status": {
                    "type": "string"
                  },
                  "file": {
                    "type": "string",
                    "format": "binary"
                  }
                }
              },
              "encoding": {
                "PolicyName": {
                  "style": "form"
                },
                "Category": {
                  "style": "form"
                },
                "Version": {
                  "style": "form"
                },
                "Owner": {
                  "style": "form"
                },
                "Status": {
                  "style": "form"
                },
                "file": {
                  "style": "form"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/LegalCompliance/policies/my": {
      "get": {
        "tags": [
          "LegalCompliance"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/LegalCompliance/policies/{policyId}/download": {
      "get": {
        "tags": [
          "LegalCompliance"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "policyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/LegalCompliance/policies/{policyId}": {
      "delete": {
        "tags": [
          "LegalCompliance"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "policyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/LegalCompliance/policies/{policyId}/acknowledgments": {
      "get": {
        "tags": [
          "LegalCompliance"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "policyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "LegalCompliance"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "policyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePolicyAcknowledgmentDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePolicyAcknowledgmentDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePolicyAcknowledgmentDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/companies/{companyId}/LegalCompliance/acknowledgments/{acknowledgmentId}/status": {
      "patch": {
        "tags": [
          "LegalCompliance"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "acknowledgmentId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePolicyAcknowledgmentDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePolicyAcknowledgmentDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdatePolicyAcknowledgmentDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/LineOfCredit/{companyId}": {
      "post": {
        "tags": [
          "LineOfCredit"
        ],
        "summary": "Creates a new Line of Credit and initializes its baseline tracking schedule.",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "The GUID of the Company establishing the line of credit",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "The limits and dates of the line of credit to create",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateLineOfCreditDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateLineOfCreditDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateLineOfCreditDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "tags": [
          "LineOfCredit"
        ],
        "summary": "Gets all existing Line of Credit records for a specific company",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/LineOfCredit/{companyId}/{creditId}": {
      "get": {
        "tags": [
          "LineOfCredit"
        ],
        "summary": "Gets a specific Line of Credit data for a specific company by its ID",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "creditId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "LineOfCredit"
        ],
        "summary": "Soft deletes an existing Line of Credit",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "creditId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/LineOfCredit/details/{companyId}/{creditId}": {
      "put": {
        "tags": [
          "LineOfCredit"
        ],
        "summary": "Updates constraint details of an existing Line of Credit (like limits or dates)",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "creditId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateLineOfCreditDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateLineOfCreditDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateLineOfCreditDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/LineOfCredit/{companyId}/{creditId}/transaction": {
      "put": {
        "tags": [
          "LineOfCredit"
        ],
        "summary": "Logs a drawdown or repayment for a specific Line of Credit on a specific date",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "creditId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AddLineOfCreditTransactionDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/AddLineOfCreditTransactionDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/AddLineOfCreditTransactionDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/conversations/{conversationId}/messages": {
      "get": {
        "tags": [
          "Messages"
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "before",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "format": "int32",
              "default": 50
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Messages"
        ],
        "parameters": [
          {
            "name": "conversationId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SendMessageDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/SendMessageDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/SendMessageDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/messages/{messageId}/read": {
      "post": {
        "tags": [
          "Messages"
        ],
        "parameters": [
          {
            "name": "messageId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Onboarding/status": {
      "get": {
        "tags": [
          "Onboarding"
        ],
        "summary": "Check user's onboarding status - determines if they need to onboard or go to dashboard",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Permissions/users/me/permissions": {
      "get": {
        "tags": [
          "Permissions"
        ],
        "summary": "Get current user's effective permissions (for frontend)",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Permissions": {
      "get": {
        "tags": [
          "Permissions"
        ],
        "summary": "Get all available permissions in the system.\r\nOptionally filter by role level - Company/Special roles don't see firm-only modules.",
        "parameters": [
          {
            "name": "roleLevel",
            "in": "query",
            "description": "Optional: 'Firm', 'Company', or 'Special'. If Company/Special, excludes firm-only modules.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Permissions/roles/{roleId}/permissions": {
      "get": {
        "tags": [
          "Permissions"
        ],
        "summary": "Get permissions for a specific role",
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "Permissions"
        ],
        "summary": "Update permissions for a role (FirmOwner only)",
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRolePermissionsRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRolePermissionsRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRolePermissionsRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Permissions/roles": {
      "post": {
        "tags": [
          "Permissions"
        ],
        "summary": "Create a custom role (FirmOwner/FirmAdmin only)",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCustomRoleRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCustomRoleRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCustomRoleRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "tags": [
          "Permissions"
        ],
        "summary": "Get all roles in the system",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Permissions/check": {
      "get": {
        "tags": [
          "Permissions"
        ],
        "summary": "Check if current user has a specific permission",
        "parameters": [
          {
            "name": "module",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "action",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Permissions/roles/{roleId}": {
      "get": {
        "tags": [
          "Permissions"
        ],
        "summary": "Get role by ID with its permissions",
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "Permissions"
        ],
        "summary": "Update a custom role (name, description, level) - Cannot update system roles",
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRoleRequest"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRoleRequest"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateRoleRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Permissions"
        ],
        "summary": "Delete a custom role - Cannot delete system roles or roles in use",
        "parameters": [
          {
            "name": "roleId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Projects": {
      "get": {
        "tags": [
          "Projects"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "Projects"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProjectDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProjectDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProjectDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Projects/company/{companyId}": {
      "get": {
        "tags": [
          "Projects"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Projects/{id}": {
      "get": {
        "tags": [
          "Projects"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "Projects"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProjectDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProjectDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProjectDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "Projects"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ProjectTasks/assigned": {
      "get": {
        "tags": [
          "ProjectTasks"
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ProjectTasks": {
      "get": {
        "tags": [
          "ProjectTasks"
        ],
        "parameters": [
          {
            "name": "assignedTo",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "post": {
        "tags": [
          "ProjectTasks"
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProjectTaskDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProjectTaskDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateProjectTaskDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ProjectTasks/project/{projectId}": {
      "get": {
        "tags": [
          "ProjectTasks"
        ],
        "parameters": [
          {
            "name": "projectId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ProjectTasks/{id}": {
      "get": {
        "tags": [
          "ProjectTasks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "ProjectTasks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProjectTaskDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProjectTaskDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateProjectTaskDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "ProjectTasks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ProjectTasks/{id}/progress": {
      "patch": {
        "tags": [
          "ProjectTasks"
        ],
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTaskProgressDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTaskProgressDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateTaskProgressDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QuickBooks/authorize": {
      "get": {
        "tags": [
          "QuickBooks"
        ],
        "summary": "Authorize with QuickBooks",
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "description": "Optional company ID to associate the integration with",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QuickBooks/callback": {
      "get": {
        "tags": [
          "QuickBooks"
        ],
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "realmId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QuickBooksData/allCustomers": {
      "get": {
        "tags": [
          "QuickBooksData"
        ],
        "summary": "Get all customers directly from QuickBooks",
        "description": "Fetches all customers directly from QuickBooks without saving to the database. Requires realmId parameter.",
        "parameters": [
          {
            "name": "realmId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QuickBooksData/customers/{customerId}": {
      "get": {
        "tags": [
          "QuickBooksData"
        ],
        "summary": "Get a customer by ID directly from QuickBooks",
        "description": "Fetches a single customer by ID directly from QuickBooks without saving to the database. Requires realmId parameter.",
        "parameters": [
          {
            "name": "customerId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "realmId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QuickBooksData/invoices": {
      "get": {
        "tags": [
          "QuickBooksData"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QuickBooksData/payments": {
      "get": {
        "tags": [
          "QuickBooksData"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QuickBooksData/revenue": {
      "get": {
        "tags": [
          "QuickBooksData"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QuickBooksData/netIncome": {
      "get": {
        "tags": [
          "QuickBooksData"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QuickBooksData/expense": {
      "get": {
        "tags": [
          "QuickBooksData"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QuickBooksData/grossProfitMargin": {
      "get": {
        "tags": [
          "QuickBooksData"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QuickBooksData/operatingMargin": {
      "get": {
        "tags": [
          "QuickBooksData"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QuickBooksData/netMargin": {
      "get": {
        "tags": [
          "QuickBooksData"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QuickBooksData/getAPAgingSummary": {
      "get": {
        "tags": [
          "QuickBooksData"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "asOfDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QuickBooksData/getARAgingSummary": {
      "get": {
        "tags": [
          "QuickBooksData"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QuickBooksData/quickBooksTrends": {
      "get": {
        "tags": [
          "QuickBooksData"
        ],
        "summary": "Get Trends Data",
        "description": "Retrieves all trends data based on Month and Year, ",
        "parameters": [
          {
            "name": "realmId",
            "in": "query",
            "description": "The QuickBooks realm ID (Company ID).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "description": "The internal company Guid.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format (e.g., 2024-03-01).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2024-03-31).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "summarizeBy",
            "in": "query",
            "description": "Month = 0, Year = 1",
            "schema": {
              "$ref": "#/components/schemas/TrendsType"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QuickBooksData/cashFlow": {
      "get": {
        "tags": [
          "QuickBooksData"
        ],
        "summary": "Get Cash Flow Data for My KPIs",
        "description": "Fetching Operating Cash Flow, Free Cash Flow and Net Cash Flow.",
        "parameters": [
          {
            "name": "realmId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QuickBooksData/cashOnHand": {
      "get": {
        "tags": [
          "QuickBooksData"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QuickBooksData/invoiceDetails": {
      "get": {
        "tags": [
          "QuickBooksData"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QuickBooksData/agedReceivablesData": {
      "get": {
        "tags": [
          "QuickBooksData"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "asOfDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QuickBooksData/sales": {
      "get": {
        "tags": [
          "QuickBooksData"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QuickBooksData/accountReceivableDetails": {
      "get": {
        "tags": [
          "QuickBooksData"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "asOfDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QuickBooksData/accountPayableData": {
      "get": {
        "tags": [
          "QuickBooksData"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "asOfDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QuickBooksData/payableDetails": {
      "get": {
        "tags": [
          "QuickBooksData"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QuickBooksData/accountPayableDetails": {
      "get": {
        "tags": [
          "QuickBooksData"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QuickBooksData/profitandloss": {
      "get": {
        "tags": [
          "QuickBooksData"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QuickBooksData/FinancialReturnsSummary": {
      "get": {
        "tags": [
          "QuickBooksData"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "query",
            "description": "The QuickBooks realm ID (Company ID).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "description": "The internal company Guid.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format(e.g., 2025-03-01).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format(e.g., 2025-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QuickBooksData/daysPayableOutstandingSummary": {
      "get": {
        "tags": [
          "QuickBooksData"
        ],
        "summary": "Get Days Payable Outstanding Summary",
        "description": "Returns Days Payable Outstanding",
        "parameters": [
          {
            "name": "realmId",
            "in": "query",
            "description": "The QuickBooks realm ID (Company ID).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "description": "The internal company Guid.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format (e.g., 2025-03-01).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2025-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QuickBooksData/currentRatio": {
      "get": {
        "tags": [
          "QuickBooksData"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "query",
            "description": "The QuickBooks realm ID (Company ID).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "description": "The internal company Guid.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format(e.g., 2025-03-01).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format(e.g., 2025-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QuickBooksData/leverageMetrics": {
      "get": {
        "tags": [
          "QuickBooksData"
        ],
        "parameters": [
          {
            "name": "realmId",
            "in": "query",
            "description": "The QuickBooks realm ID (Company ID).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "description": "The internal company Guid.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format(e.g., 2025-03-01).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format(e.g., 2025-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QuickBooksData/daysSalesOutstandingSummary": {
      "get": {
        "tags": [
          "QuickBooksData"
        ],
        "summary": "Get Days Sales Outstanding Summary",
        "description": "Returns Days Sales Outstanding",
        "parameters": [
          {
            "name": "realmId",
            "in": "query",
            "description": "The QuickBooks realm ID (Company ID).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "description": "The internal company Guid.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format (e.g., 2025-03-01).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2025-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QuickBooksData/cashFlowStatementSummary": {
      "get": {
        "tags": [
          "QuickBooksData"
        ],
        "summary": "Get Statement of Cashflow",
        "description": "Returns Operating, investing and financing Cashflow",
        "parameters": [
          {
            "name": "realmId",
            "in": "query",
            "description": "The QuickBooks realm ID (Company ID).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "description": "The internal company Guid.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format (e.g., 2025-03-01).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2025-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QuickBooksData/cashflowTrends": {
      "get": {
        "tags": [
          "QuickBooksData"
        ],
        "summary": "Get Trends of Cashflow",
        "description": "Retrieves operating cashflow, free cashflow and net cashflow trends based on Month and Year",
        "parameters": [
          {
            "name": "realmId",
            "in": "query",
            "description": "The QuickBooks realm ID (Company ID).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "description": "The internal company Guid.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "summarizeBy",
            "in": "query",
            "description": "Month = 0, Year = 1",
            "schema": {
              "$ref": "#/components/schemas/TrendsType"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QuickBooksData/bankDetails": {
      "get": {
        "tags": [
          "QuickBooksData"
        ],
        "summary": "Get Bank Details",
        "description": "Returns balance in individual bank accounts from Bank report",
        "parameters": [
          {
            "name": "realmId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QuickBooksData/cashConversionCycle": {
      "get": {
        "tags": [
          "QuickBooksData"
        ],
        "summary": "Get The Cash Conversion Cycle",
        "description": "Get The Cash Conversion Cycle",
        "parameters": [
          {
            "name": "realmId",
            "in": "query",
            "description": "The QuickBooks realm ID (Company ID).",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "description": "The internal company Guid.",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format (e.g., 2025-03-01).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2025-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/QuickBooksData/assets": {
      "get": {
        "tags": [
          "QuickBooksData"
        ],
        "summary": "Get Fixed and Intangible Assets",
        "description": "Retrieves a flattened list of fixed and intangible assets including purchase cost and accumulated depreciation.",
        "parameters": [
          {
            "name": "realmId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/QuickbookAssetDtoListBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuickbookAssetDtoListBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/QuickbookAssetDtoListBaseResponse"
                }
              }
            }
          },
          "404": {
            "description": "Not Found",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          },
          "500": {
            "description": "Internal Server Error",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/ObjectBaseResponse"
                }
              }
            }
          }
        }
      }
    },
    "/api/Roles": {
      "get": {
        "tags": [
          "Roles"
        ],
        "summary": "Get all available roles",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Roles/firm": {
      "get": {
        "tags": [
          "Roles"
        ],
        "summary": "Get firm-level roles only",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Roles/company": {
      "get": {
        "tags": [
          "Roles"
        ],
        "summary": "Get company-level roles only",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/TermLoan/{companyId}": {
      "post": {
        "tags": [
          "TermLoan"
        ],
        "summary": "API for termLoan. Gets or Processes the loan and returns calculation results.",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTermLoanDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTermLoanDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTermLoanDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "get": {
        "tags": [
          "TermLoan"
        ],
        "summary": "Gets the term loan data for a specific company if it exists.",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/TermLoan/{companyId}/{loanId}": {
      "get": {
        "tags": [
          "TermLoan"
        ],
        "summary": "Gets the specific loan data for a specific company if it exists.",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "loanId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "put": {
        "tags": [
          "TermLoan"
        ],
        "summary": "Updates an existing term loan and returns the updated calculation results.",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "loanId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "description": "",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTermLoanDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTermLoanDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateTermLoanDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      },
      "delete": {
        "tags": [
          "TermLoan"
        ],
        "summary": "Soft deletes an existing term loan.",
        "parameters": [
          {
            "name": "companyId",
            "in": "path",
            "description": "",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "loanId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/TokenStatus/check-status": {
      "post": {
        "tags": [
          "TokenStatus"
        ],
        "summary": "Gets token status for multiple tenants across a platform",
        "requestBody": {
          "description": "Token status request containing platform and tenant IDs",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenStatusRequestDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/TokenStatusRequestDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/TokenStatusRequestDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/TokenStatusResponseDto"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenStatusResponseDto"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/TokenStatusResponseDto"
                }
              }
            }
          }
        }
      }
    },
    "/api/Users": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get all users",
        "responses": {
          "200": {
            "description": "OK"
          },
          "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"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "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": [
          "Users"
        ],
        "summary": "Create a new user",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CreateUserDto"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created"
          },
          "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"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "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"
          }
        }
      }
    },
    "/api/Users/{id}": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get user by ID",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "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": [
          "Users"
        ],
        "summary": "Update an existing user",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserDto"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserDto"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateUserDto"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "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": [
          "Users"
        ],
        "summary": "Delete a user",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          },
          "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "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"
          }
        }
      }
    },
    "/api/Users/roles": {
      "get": {
        "tags": [
          "Users"
        ],
        "summary": "Get all client roles",
        "responses": {
          "200": {
            "description": "OK"
          },
          "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"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "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"
          }
        }
      }
    },
    "/api/Users/{id}/roles": {
      "post": {
        "tags": [
          "Users"
        ],
        "summary": "Assign roles to a user",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "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": [
          "Users"
        ],
        "summary": "Remove roles from a user",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "text/json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            },
            "application/*+json": {
              "schema": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "OK"
          },
          "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden",
            "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"
          }
        }
      }
    },
    "/api/UserSession": {
      "get": {
        "tags": [
          "UserSession"
        ],
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/wafeq/connect": {
      "get": {
        "tags": [
          "Wafeq"
        ],
        "summary": "Use to connect to wafeq platform",
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "description": "Optional company ID to associate the integration with",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/wafeq/callback": {
      "get": {
        "tags": [
          "Wafeq"
        ],
        "summary": "Use to handle the callback from wafeq platform",
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/wafeq/refresh-token/{tenantId}": {
      "post": {
        "tags": [
          "Wafeq"
        ],
        "summary": "Refresh token for a specific tenant",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/WafeqData/profitAndLossSummary": {
      "get": {
        "tags": [
          "WafeqData"
        ],
        "summary": "Get Profit and Loss Summary",
        "description": "Returns grossProfitMargin, netMargin and netIncome, revenue, expenses and operatingMargin from the Profit & Loss report",
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format (e.g., 2025-03-01).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2025-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/WafeqData/balanceSheetSummary": {
      "get": {
        "tags": [
          "WafeqData"
        ],
        "summary": "Get Balance Sheet Summary",
        "description": "Returns Asset, Liability and Equity from Balance Sheet report",
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "asOfDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2025-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/WafeqData/profitAndLossTrends": {
      "get": {
        "tags": [
          "WafeqData"
        ],
        "summary": "Get ProfitAndLossTrends Summary",
        "description": "Returns trends of netIncome, revenue, expenses, grossProfitMargin and netMargin  from the ProfitAndLoss report",
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timeFrame",
            "in": "query",
            "description": "Time frame for grouping (Month = 0 or Year = 1)",
            "schema": {
              "$ref": "#/components/schemas/TrendsType"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format (e.g., 2024-03-01).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2024-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/WafeqData/cashFlowSummary": {
      "get": {
        "tags": [
          "WafeqData"
        ],
        "summary": "Get CashFlow Summary",
        "description": "Returns Net Cash Flow, Free Cash Flow, Operating Cash Flow from Cash Flow report",
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format (e.g., 2025-03-01).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2025-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/WafeqData/cashFlowTrends": {
      "get": {
        "tags": [
          "WafeqData"
        ],
        "summary": "Get Cash Flow Trends Summary",
        "description": "Returns Net Cash Flow trend from the CashFlow report",
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "timeFrame",
            "in": "query",
            "description": "Time frame for grouping (Month = 0 or Year = 1)",
            "schema": {
              "$ref": "#/components/schemas/TrendsType"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/WafeqData/incomeStatementSummary": {
      "get": {
        "tags": [
          "WafeqData"
        ],
        "summary": "Get Income Statement Summary",
        "description": "Returns Income Statement complete report",
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format (e.g., 2025-03-01).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2025-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/WafeqData/accountReceivableSummary": {
      "get": {
        "tags": [
          "WafeqData"
        ],
        "summary": "Get Account Receivable Summary",
        "description": "Returns Account Receivable report",
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/WafeqData/accountPayableSummary": {
      "get": {
        "tags": [
          "WafeqData"
        ],
        "summary": "Get Account Payable Summary",
        "description": "Returns Account Payable report",
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/WafeqData/financialReturnsSummary": {
      "get": {
        "tags": [
          "WafeqData"
        ],
        "summary": "Get Financial Returns Summary",
        "description": "Fetch data from Wafeq returns Financial Returns",
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format (e.g., 2025-03-01).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2025-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/WafeqData/daysPayableOutstandingSummary": {
      "get": {
        "tags": [
          "WafeqData"
        ],
        "summary": "Get Days Payable Outstanding Summary",
        "description": "Returns Days Payable Outstanding",
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format (e.g., 2025-03-01).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2025-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/WafeqData/currentRatio": {
      "get": {
        "tags": [
          "WafeqData"
        ],
        "summary": "Get Current Ratio",
        "description": "Returns Current Ratio",
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/WafeqData/leverageMetrics": {
      "get": {
        "tags": [
          "WafeqData"
        ],
        "summary": "Get Leverage Metrics",
        "description": "Returns Debt to Equity and DSCR",
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format (e.g., 2025-03-01).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2025-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/WafeqData/daysSalesOutstandingSummary": {
      "get": {
        "tags": [
          "WafeqData"
        ],
        "summary": "Get Days Sales Outstanding Summary",
        "description": "Returns Days Sales Outstanding",
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format (e.g., 2025-03-01).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2025-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/WafeqData/cashConversionCycle": {
      "get": {
        "tags": [
          "WafeqData"
        ],
        "summary": "Get Cash Conversion Cycle",
        "description": "Returns Cash Conversion Cycle",
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format (e.g., 2025-03-01).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2025-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/WafeqData/cashFlowStatementSummary": {
      "get": {
        "tags": [
          "WafeqData"
        ],
        "summary": "Get Cash Flow Statement",
        "description": "Returns the complete Cash Flow Statement report",
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/xero/connect": {
      "get": {
        "tags": [
          "Xero"
        ],
        "summary": "Use to connect to Xero platform",
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "description": "Optional company ID to associate the integration with",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/xero/callback": {
      "get": {
        "tags": [
          "Xero"
        ],
        "summary": "Use to handle the callback from Xero platform",
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/xero/refresh-token/{tenantId}": {
      "post": {
        "tags": [
          "Xero"
        ],
        "summary": "Refresh token for a specific tenant",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/xero-data/{tenantId}/contacts": {
      "get": {
        "tags": [
          "XeroData"
        ],
        "summary": "Fetch contacts from Xero for a specific date range",
        "description": "Retrieves contacts that were created or updated within the specified date range",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "description": "The Xero tenant/organization ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format (e.g., 2024-03-01). Time will be set to 00:00:00",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2024-03-31). Time will be set to 23:59:59",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/xero-data/{tenantId}/bank-transactions": {
      "get": {
        "tags": [
          "XeroData"
        ],
        "summary": "Fetch bank transactions from Xero for a specific date range",
        "description": "Retrieves bank transactions that were created or updated within the specified date range",
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "description": "The Xero tenant/organization ID",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format (e.g., 2024-03-01). Time will be set to 00:00:00",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2024-03-31). Time will be set to 23:59:59",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/xero-data/allContacts": {
      "get": {
        "tags": [
          "XeroData"
        ],
        "summary": "Get All Contacts Directly from Xero",
        "description": "This API will fetch all contacts directly from Xero API without saving to database. Requires tenantId parameter.",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/xero-data/contact/{contactId}": {
      "get": {
        "tags": [
          "XeroData"
        ],
        "summary": "Get a Contact by ID Directly from Xero",
        "description": "This API will fetch a contact by ID directly from Xero API without saving to database. Requires tenantId parameter.",
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/xero-data/allBankTransactions": {
      "get": {
        "tags": [
          "XeroData"
        ],
        "summary": "Get All Bank Transactions",
        "description": "This API will fetch all the Bank Transactions.",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/xero-data/bankTransaction/{bankTransactionId}": {
      "get": {
        "tags": [
          "XeroData"
        ],
        "summary": "Get an Bank Transaction by ID",
        "description": "Test the API using the Transaction ID: --Currently Unknown--",
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "bankTransactionId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/xero-data/profitAndLossSummary": {
      "get": {
        "tags": [
          "XeroData"
        ],
        "summary": "Get Profit and Loss Summary",
        "description": "Returns grossProfitMargin, netMargin and netIncome, revenue, expenses and operatingMargin from the Profit & Loss report",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format (e.g., 2025-03-01).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2025-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/xero-data/profitAndLossTrends": {
      "get": {
        "tags": [
          "XeroData"
        ],
        "summary": "Get ProfitAndLossTrends Summary",
        "description": "Returns trends of netIncome, revenue, expenses, grossProfitMargin and netMargin  from the ProfitAndLoss report",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "timeFrame",
            "in": "query",
            "description": "Time frame for grouping (Month or Year)",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format (e.g., 2024-03-01).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2024-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/xero-data/balanceSheetSummary": {
      "get": {
        "tags": [
          "XeroData"
        ],
        "summary": "Get Balance Sheet Summary",
        "description": "Returns Assets, Liabilities and Equity from Balance Sheet report",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "asOfDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2025-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/xero-data/FinancialReturnsSummary": {
      "get": {
        "tags": [
          "XeroData"
        ],
        "summary": "Get Financial Returns Summary",
        "description": "Returns Financial Returns",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format (e.g., 2025-03-01).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2025-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/xero-data/bankSummary": {
      "get": {
        "tags": [
          "XeroData"
        ],
        "summary": "Get BankSummary(Cashflow)",
        "description": "Returns cash going in, cash going out, opening cash balance, closing cash balance  from BankSummary report",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format (e.g., 2025-03-01).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2025-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/xero-data/invoiceDetails": {
      "get": {
        "tags": [
          "XeroData"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/xero-data/accountReceivableDetails": {
      "get": {
        "tags": [
          "XeroData"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "asOfDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/xero-data/accountPayableDetails": {
      "get": {
        "tags": [
          "XeroData"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "asOfDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/xero-data/payableDetails": {
      "get": {
        "tags": [
          "XeroData"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/xero-data/daysPayableOutstandingSummary": {
      "get": {
        "tags": [
          "XeroData"
        ],
        "summary": "Get Days Payable Outstanding Summary",
        "description": "Returns Days Payable Outstanding",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format (e.g., 2025-03-01).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2025-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/xero-data/currentRatio": {
      "get": {
        "tags": [
          "XeroData"
        ],
        "summary": "Get Current Ratio",
        "description": "Returns Current Ratio",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/xero-data/debtToEquity": {
      "get": {
        "tags": [
          "XeroData"
        ],
        "summary": "Get Debt to Equity",
        "description": "Returns Debt to Equity",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format (e.g., 2025-03-01).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2025-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/xero-data/daysSalesOutstandingSummary": {
      "get": {
        "tags": [
          "XeroData"
        ],
        "summary": "Get Days Sales Outstanding Summary",
        "description": "Returns Days Sales Outstanding",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format (e.g., 2025-03-01).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2025-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/xero-data/bankDetails": {
      "get": {
        "tags": [
          "XeroData"
        ],
        "summary": "Get Bank Details",
        "description": "Returns balance in individual bank accounts from BankSummary report",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/xero-data/cashConversionCycle": {
      "get": {
        "tags": [
          "XeroData"
        ],
        "summary": "Get Cash Conversion Cycle ",
        "description": " Returns Cash Conversion Cycle ",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format (e.g., 2025-03-01).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2025-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/xero-data/fixedAssets": {
      "get": {
        "tags": [
          "XeroData"
        ],
        "summary": "Get Fixed Assets Details",
        "description": " Returns Fixed Asset details",
        "parameters": [
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Zoho/connect": {
      "get": {
        "tags": [
          "Zoho"
        ],
        "summary": "Connect to Zoho platform",
        "parameters": [
          {
            "name": "companyId",
            "in": "query",
            "description": "Optional company ID to associate the integration with",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/Zoho/callback": {
      "get": {
        "tags": [
          "Zoho"
        ],
        "parameters": [
          {
            "name": "code",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "location",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "com"
            }
          },
          {
            "name": "state",
            "in": "query",
            "schema": {
              "type": "string",
              "default": ""
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ZohoData/contacts": {
      "get": {
        "tags": [
          "ZohoData"
        ],
        "summary": "Fetch contacts from Zoho",
        "description": "Fetches contacts from Zoho and stores them in the database",
        "parameters": [
          {
            "name": "dataCenterId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/ZohoData/transactions": {
      "get": {
        "tags": [
          "ZohoData"
        ],
        "summary": "Fetch transactions from Zoho",
        "description": "Fetches transactions from Zoho and stores them in the database",
        "parameters": [
          {
            "name": "dataCenterId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "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"
                }
              }
            }
          },
          "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"
                }
              }
            }
          }
        }
      }
    },
    "/api/ZohoData/allContacts": {
      "get": {
        "tags": [
          "ZohoData"
        ],
        "summary": "Get All Contacts",
        "description": "This API will fetch all the Zoho Contacts from the database.",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ZohoData/contact/{contactId}": {
      "get": {
        "tags": [
          "ZohoData"
        ],
        "summary": "Get a Contact by ID",
        "description": "Get a Zoho Contact by its ID",
        "parameters": [
          {
            "name": "contactId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ZohoData/allInvoices": {
      "get": {
        "tags": [
          "ZohoData"
        ],
        "summary": "Get All Invoices",
        "description": "This API will fetch all the Zoho Invoices from the database.",
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ZohoData/invoice/{invoiceId}": {
      "get": {
        "tags": [
          "ZohoData"
        ],
        "summary": "Get an Invoice by ID",
        "description": "Get a Zoho Invoice by its ID",
        "parameters": [
          {
            "name": "invoiceId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ZohoData/getprofitAndLossSummary": {
      "get": {
        "tags": [
          "ZohoData"
        ],
        "summary": "Get Profit and Loss Summary",
        "description": "Fetch data from Zoho, Returns grossProfit, grossProfitMargin, netMargin, netIncome, revenue, expenses and operatingMargin from the Profit & Loss report",
        "parameters": [
          {
            "name": "dataCenterId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format (e.g., 2025-03-01).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2025-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ZohoData/FinancialReturnsSummary": {
      "get": {
        "tags": [
          "ZohoData"
        ],
        "summary": "Get Financial Returns Summary",
        "description": "Fetch data from Zoho returns Financial Returns",
        "parameters": [
          {
            "name": "dataCenterId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format (e.g., 2025-03-01).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2025-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ZohoData/balanceSheetSummary": {
      "get": {
        "tags": [
          "ZohoData"
        ],
        "summary": "Get Balance Sheet Summary",
        "description": "Fetch data from Zoho from Balance Sheet report",
        "parameters": [
          {
            "name": "dataCenterId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "asOfDate",
            "in": "query",
            "description": "AsOf date in yyyy-MM-dd format (e.g., 2025-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ZohoData/incomeStatementSummary": {
      "get": {
        "tags": [
          "ZohoData"
        ],
        "summary": "Get Income Statement Summary",
        "description": "Fetch data from Zoho, Income Statement report",
        "parameters": [
          {
            "name": "dataCenterId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format (e.g., 2025-03-01).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2025-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ZohoData/cashflowStatementSummary": {
      "get": {
        "tags": [
          "ZohoData"
        ],
        "summary": "Get Cashflow Statement Summary",
        "description": "Fetch data from Zoho, Cashflow Statement report",
        "parameters": [
          {
            "name": "dataCenterId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format (e.g., 2025-03-01).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2025-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ZohoData/getAPAgingSummary": {
      "get": {
        "tags": [
          "ZohoData"
        ],
        "summary": "Get Account Payable Aging Summary",
        "description": "Fetch data from Zoho from the APAgingSummary report",
        "parameters": [
          {
            "name": "dataCenterId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format (e.g., 2025-03-01).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2025-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ZohoData/getARAgingSummary": {
      "get": {
        "tags": [
          "ZohoData"
        ],
        "summary": "Get Account Recievable Aging Summary",
        "description": "Fetch data from Zoho from the ARAgingSummary report",
        "parameters": [
          {
            "name": "dataCenterId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format (e.g., 2025-03-01).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2025-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ZohoData/getARAgingDetails": {
      "get": {
        "tags": [
          "ZohoData"
        ],
        "summary": "Get Account Recievable Customer Balance Summary",
        "description": "Fetch data from Zoho from the ARCustomerBalanceSummary report",
        "parameters": [
          {
            "name": "dataCenterId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "asOfDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ZohoData/getAPAgingDetails": {
      "get": {
        "tags": [
          "ZohoData"
        ],
        "summary": "Get Account Payable Vendor Balance Summary",
        "description": "Fetch data from Zoho from the APVendorBalanceSummary report",
        "parameters": [
          {
            "name": "dataCenterId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "asOfDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ZohoData/getCashFlowData": {
      "get": {
        "tags": [
          "ZohoData"
        ],
        "summary": "Get Cash Flow Data",
        "description": "Fetch Cash Flow data frm Zoho.",
        "parameters": [
          {
            "name": "dataCenterId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ZohoData/getCashOnHand": {
      "get": {
        "tags": [
          "ZohoData"
        ],
        "summary": "Get Cash On Hand Data",
        "parameters": [
          {
            "name": "dataCenterId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ZohoData/getInvoices": {
      "get": {
        "tags": [
          "ZohoData"
        ],
        "parameters": [
          {
            "name": "dataCenterId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ZohoData/getBills": {
      "get": {
        "tags": [
          "ZohoData"
        ],
        "parameters": [
          {
            "name": "dataCenterId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ZohoData/daysPayableOutstandingSummary": {
      "get": {
        "tags": [
          "ZohoData"
        ],
        "summary": "Get Days Payable Outstanding Summary",
        "description": "Returns Days Payable Outstanding",
        "parameters": [
          {
            "name": "dataCenterId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format (e.g., 2025-03-01).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2025-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ZohoData/currentRatio": {
      "get": {
        "tags": [
          "ZohoData"
        ],
        "summary": "Get Current Ratio",
        "description": "Fetch Current Ratio",
        "parameters": [
          {
            "name": "dataCenterId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format (e.g., 2025-03-01).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2025-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ZohoData/leverageMetrics": {
      "get": {
        "tags": [
          "ZohoData"
        ],
        "summary": "Get Leverage Metrics",
        "description": "Returns Debt to Equity and DSCR",
        "parameters": [
          {
            "name": "dataCenterId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format (e.g., 2025-03-01).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2025-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ZohoData/daysSalesOutstandingSummary": {
      "get": {
        "tags": [
          "ZohoData"
        ],
        "summary": "Get Days Sales Outstanding Summary",
        "description": "Returns Days Sales Outstanding",
        "parameters": [
          {
            "name": "dataCenterId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format (e.g., 2025-03-01).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2025-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ZohoData/cashflowTrends": {
      "get": {
        "tags": [
          "ZohoData"
        ],
        "summary": "Get Trends of Cashflow",
        "description": "Retrieves operating cashflow, free cashflow and net cashflow trends based on Month and Year",
        "parameters": [
          {
            "name": "dataCenterId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "summarizeBy",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/TrendsType"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ZohoData/bankDetails": {
      "get": {
        "tags": [
          "ZohoData"
        ],
        "summary": "Get Bank Details",
        "description": "Returns balance in individual bank accounts from Bank Accounts report",
        "parameters": [
          {
            "name": "dataCenterId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ZohoData/cashConversionCycle": {
      "get": {
        "tags": [
          "ZohoData"
        ],
        "summary": "Get Cash Conversion Cycle",
        "description": "Returns Cash Conversion Cycle",
        "parameters": [
          {
            "name": "dataCenterId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "startDate",
            "in": "query",
            "description": "Start date in yyyy-MM-dd format (e.g., 2025-03-01).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "endDate",
            "in": "query",
            "description": "End date in yyyy-MM-dd format (e.g., 2025-04-30).",
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/api/ZohoData/fixedAssets": {
      "get": {
        "tags": [
          "ZohoData"
        ],
        "summary": "Get fixed Asset Details",
        "description": "Returns Fixed Asset Details",
        "parameters": [
          {
            "name": "dataCenterId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "companyId",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "tenantId",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AIAlert": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "nullable": true
          },
          "message": {
            "type": "string",
            "nullable": true
          },
          "severity": {
            "type": "string",
            "nullable": true
          },
          "recommendedAction": {
            "type": "string",
            "nullable": true
          },
          "confidence": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "AIQueryRequest": {
        "required": [
          "platform",
          "query",
          "tenantId"
        ],
        "type": "object",
        "properties": {
          "query": {
            "maxLength": 2000,
            "minLength": 0,
            "type": "string"
          },
          "platform": {
            "minLength": 1,
            "pattern": "^(xero|quickbooks|zoho)$",
            "type": "string"
          },
          "tenantId": {
            "minLength": 1,
            "type": "string"
          },
          "startDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "endDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "context": {
            "type": "object",
            "additionalProperties": { },
            "nullable": true
          },
          "responseFormat": {
            "type": "string",
            "nullable": true
          },
          "conversationId": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "AIQueryResponse": {
        "type": "object",
        "properties": {
          "response": {
            "type": "string",
            "nullable": true
          },
          "keyMetrics": {
            "type": "object",
            "additionalProperties": { },
            "nullable": true
          },
          "insights": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "recommendations": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "alerts": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AIAlert"
            },
            "nullable": true
          },
          "dataSources": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          },
          "confidenceScore": {
            "type": "integer",
            "format": "int32"
          },
          "generatedAt": {
            "type": "string",
            "format": "date-time"
          },
          "processingTimeMs": {
            "type": "integer",
            "format": "int64"
          },
          "functionCallsCount": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "AddLineOfCreditTransactionDto": {
        "type": "object",
        "properties": {
          "transactionDate": {
            "type": "string",
            "format": "date-time"
          },
          "drawdownAmount": {
            "type": "number",
            "format": "double"
          },
          "repaymentAmount": {
            "type": "number",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "AddParticipantDto": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "nullable": true
          },
          "isAdmin": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "AssignUserToCompanyDto": {
        "type": "object",
        "properties": {
          "userId": {
            "type": "string",
            "nullable": true
          },
          "roleId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "BondCalculationRequestDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "lender": {
            "type": "string",
            "nullable": true
          },
          "issuedValue": {
            "type": "number",
            "format": "double"
          },
          "issuedDate": {
            "type": "string",
            "format": "date-time"
          },
          "maturityDate": {
            "type": "string",
            "format": "date-time"
          },
          "couponRate": {
            "type": "number",
            "format": "double"
          },
          "couponFrequency": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "ConversationType": {
        "enum": [
          1,
          2
        ],
        "type": "integer",
        "format": "int32"
      },
      "CreateCompanyDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "industry": {
            "type": "string",
            "nullable": true
          },
          "country": {
            "type": "string",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "nullable": true
          },
          "fiscalYearEndMonth": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateComplianceTaskDto": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "nullable": true
          },
          "category": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "dueDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateConversationDto": {
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/ConversationType"
          },
          "companyId": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "avatarUrl": {
            "type": "string",
            "nullable": true
          },
          "participantUserIds": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateCustomRoleRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "level": {
            "$ref": "#/components/schemas/RoleLevel"
          },
          "expirationDays": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "permissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RolePermissionCreateDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateEmployeeDto": {
        "type": "object",
        "properties": {
          "fullName": {
            "type": "string",
            "nullable": true
          },
          "department": {
            "type": "string",
            "nullable": true
          },
          "role": {
            "type": "string",
            "nullable": true
          },
          "nationality": {
            "type": "string",
            "nullable": true
          },
          "joiningDate": {
            "type": "string",
            "format": "date-time"
          },
          "monthlySalary": {
            "type": "number",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "CreateFirmDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "country": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "industry": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateFolderRequestDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "parentFolderId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateInvitationDto": {
        "type": "object",
        "properties": {
          "email": {
            "type": "string",
            "nullable": true
          },
          "roleId": {
            "type": "string",
            "format": "uuid"
          },
          "companyId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateLineOfCreditDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "lender": {
            "type": "string",
            "nullable": true
          },
          "creditLimit": {
            "type": "number",
            "format": "double"
          },
          "interestRate": {
            "type": "number",
            "format": "double"
          },
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "format": "date-time"
          }
        },
        "additionalProperties": false
      },
      "CreateMemberRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "role": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "notes": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreatePolicyAcknowledgmentDto": {
        "type": "object",
        "properties": {
          "employeeName": {
            "type": "string",
            "nullable": true
          },
          "employeeRole": {
            "type": "string",
            "nullable": true
          },
          "userId": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateProjectDto": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "format": "date-time"
          },
          "endDate": {
            "type": "string",
            "format": "date-time"
          },
          "companyId": {
            "type": "string",
            "format": "uuid"
          },
          "status": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CreateProjectTaskDto": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "dueDate": {
            "type": "string",
            "format": "date-time"
          },
          "reminder": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "priority": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "assignedTo": {
            "type": "string",
            "nullable": true
          },
          "progressPercentage": {
            "type": "integer",
            "format": "int32"
          },
          "startDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "projectId": {
            "type": "string",
            "format": "uuid"
          }
        },
        "additionalProperties": false
      },
      "CreateTermLoanDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "lender": {
            "type": "string",
            "nullable": true
          },
          "totalPrincipal": {
            "type": "number",
            "format": "double"
          },
          "disbursedDate": {
            "type": "string",
            "format": "date-time"
          },
          "firstInterestPaymentDate": {
            "type": "string",
            "format": "date-time"
          },
          "maturityDate": {
            "type": "string",
            "format": "date-time"
          },
          "interestRate": {
            "type": "number",
            "format": "double"
          }
        },
        "additionalProperties": false
      },
      "CreateUserDto": {
        "type": "object",
        "properties": {
          "username": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "firstName": {
            "type": "string",
            "nullable": true
          },
          "lastName": {
            "type": "string",
            "nullable": true
          },
          "password": {
            "type": "string",
            "nullable": true
          },
          "enabled": {
            "type": "boolean"
          },
          "clientRoles": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "DataScope": {
        "enum": [
          0,
          1,
          2,
          3
        ],
        "type": "integer",
        "format": "int32"
      },
      "FavouriteRequest": {
        "type": "object",
        "properties": {
          "companyId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "tenantId": {
            "type": "string",
            "nullable": true
          },
          "favorites": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "FeedbackRequest": {
        "type": "object",
        "properties": {
          "feedbackType": {
            "$ref": "#/components/schemas/FeedbackType"
          },
          "feedbackDescription": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "FeedbackType": {
        "enum": [
          1,
          2,
          3,
          4,
          5
        ],
        "type": "integer",
        "format": "int32"
      },
      "FixedAssetDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "assetId": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "purchaseDate": {
            "type": "string",
            "format": "date-time"
          },
          "purchaseCost": {
            "type": "number",
            "format": "double"
          },
          "life": {
            "type": "string",
            "nullable": true
          },
          "residualValue": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "depreciationMethod": {
            "type": "string",
            "nullable": true
          },
          "accumulatedDepreciation": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "depreciationSchedule": {
            "type": "string",
            "nullable": true
          },
          "depreciationLink": {
            "type": "string",
            "nullable": true
          },
          "currentValue": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "companyId": {
            "type": "string",
            "format": "uuid"
          },
          "firmId": {
            "type": "string",
            "format": "uuid"
          },
          "platform": {
            "type": "string",
            "nullable": true
          },
          "tenantId": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "IntangibleAssetDto": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "assetId": {
            "type": "string",
            "nullable": true
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "purchaseDate": {
            "type": "string",
            "format": "date-time"
          },
          "purchaseCost": {
            "type": "number",
            "format": "double"
          },
          "life": {
            "type": "string",
            "nullable": true
          },
          "residualValue": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "depreciationMethod": {
            "type": "string",
            "nullable": true
          },
          "accumulatedDepreciation": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "depreciationSchedule": {
            "type": "string",
            "nullable": true
          },
          "depreciationLink": {
            "type": "string",
            "nullable": true
          },
          "currentValue": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "note": {
            "type": "string",
            "nullable": true
          },
          "companyId": {
            "type": "string",
            "format": "uuid"
          },
          "firmId": {
            "type": "string",
            "format": "uuid"
          },
          "platform": {
            "type": "string",
            "nullable": true
          },
          "tenantId": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "MuteParticipantDto": {
        "type": "object",
        "properties": {
          "isMuted": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "ObjectBaseResponse": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "nullable": true
          },
          "data": {
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32"
          },
          "succeeded": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "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": { }
      },
      "QuickbookAssetDto": {
        "type": "object",
        "properties": {
          "assetId": {
            "type": "string",
            "nullable": true
          },
          "assetName": {
            "type": "string",
            "nullable": true
          },
          "category": {
            "type": "string",
            "nullable": true
          },
          "purchaseCost": {
            "type": "number",
            "format": "double"
          },
          "accumulatedDepreciation": {
            "type": "number",
            "format": "double"
          },
          "netBookValue": {
            "type": "number",
            "format": "double"
          },
          "purchaseDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "depreciationMethod": {
            "type": "string",
            "nullable": true
          },
          "lifeOfAsset": {
            "type": "integer",
            "format": "int32"
          }
        },
        "additionalProperties": false
      },
      "QuickbookAssetDtoListBaseResponse": {
        "type": "object",
        "properties": {
          "message": {
            "type": "string",
            "nullable": true
          },
          "data": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/QuickbookAssetDto"
            },
            "nullable": true
          },
          "status": {
            "type": "integer",
            "format": "int32"
          },
          "succeeded": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "RoleLevel": {
        "enum": [
          0,
          1,
          2
        ],
        "type": "integer",
        "format": "int32"
      },
      "RolePermissionCreateDto": {
        "type": "object",
        "properties": {
          "permissionId": {
            "type": "string",
            "format": "uuid"
          },
          "scope": {
            "$ref": "#/components/schemas/DataScope"
          }
        },
        "additionalProperties": false
      },
      "RolePermissionUpdateDto": {
        "type": "object",
        "properties": {
          "permissionId": {
            "type": "string",
            "format": "uuid"
          },
          "scope": {
            "$ref": "#/components/schemas/DataScope"
          },
          "isActive": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "SendMessageDto": {
        "type": "object",
        "properties": {
          "body": {
            "type": "string",
            "nullable": true
          },
          "attachmentIds": {
            "type": "array",
            "items": {
              "type": "string",
              "format": "uuid"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TenantTokenStatusDto": {
        "type": "object",
        "properties": {
          "tenantId": {
            "type": "string",
            "nullable": true
          },
          "tenantName": {
            "type": "string",
            "nullable": true
          },
          "baseCurrency": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "$ref": "#/components/schemas/TokenValidityStatus"
          },
          "statusText": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "requiresUserAction": {
            "type": "boolean",
            "readOnly": true
          },
          "reAuthorizationUrl": {
            "type": "string",
            "nullable": true
          },
          "accessTokenExpiry": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "refreshTokenExpiry": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "errorMessage": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TokenStatusRequestDto": {
        "required": [
          "platform",
          "tenantIds"
        ],
        "type": "object",
        "properties": {
          "platform": {
            "minLength": 1,
            "type": "string"
          },
          "tenantIds": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        },
        "additionalProperties": false
      },
      "TokenStatusResponseDto": {
        "type": "object",
        "properties": {
          "tenantStatuses": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TenantTokenStatusDto"
            },
            "nullable": true
          },
          "success": {
            "type": "boolean"
          },
          "message": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "TokenValidityStatus": {
        "enum": [
          0,
          1,
          2,
          3,
          4,
          5
        ],
        "type": "integer",
        "format": "int32"
      },
      "TrendsType": {
        "enum": [
          0,
          1
        ],
        "type": "integer",
        "format": "int32"
      },
      "UpdateCompanyDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "industry": {
            "type": "string",
            "nullable": true
          },
          "country": {
            "type": "string",
            "nullable": true
          },
          "currency": {
            "type": "string",
            "nullable": true
          },
          "fiscalYearEndMonth": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateComplianceTaskStatusDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateEmployeeDto": {
        "type": "object",
        "properties": {
          "department": {
            "type": "string",
            "nullable": true
          },
          "role": {
            "type": "string",
            "nullable": true
          },
          "nationality": {
            "type": "string",
            "nullable": true
          },
          "monthlySalary": {
            "type": "number",
            "format": "double",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateFirmDto": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "country": {
            "type": "string",
            "nullable": true
          },
          "city": {
            "type": "string",
            "nullable": true
          },
          "industry": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdatePolicyAcknowledgmentDto": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateProjectDto": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "endDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateProjectTaskDto": {
        "type": "object",
        "properties": {
          "title": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "dueDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "reminder": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "priority": {
            "type": "string",
            "nullable": true
          },
          "status": {
            "type": "string",
            "nullable": true
          },
          "assignedTo": {
            "type": "string",
            "nullable": true
          },
          "progressPercentage": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          },
          "startDate": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateRolePermissionsRequest": {
        "type": "object",
        "properties": {
          "permissions": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/RolePermissionUpdateDto"
            },
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateRoleRequest": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "nullable": true
          },
          "description": {
            "type": "string",
            "nullable": true
          },
          "expirationDays": {
            "type": "integer",
            "format": "int32",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateStatusRequest": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateTaskProgressDto": {
        "type": "object",
        "properties": {
          "progressPercentage": {
            "type": "integer",
            "format": "int32"
          },
          "status": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "UpdateUserDto": {
        "type": "object",
        "properties": {
          "firstName": {
            "type": "string",
            "nullable": true
          },
          "lastName": {
            "type": "string",
            "nullable": true
          },
          "email": {
            "type": "string",
            "nullable": true
          },
          "enabled": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "apiKey",
        "description": "JWT Authorization header using the Bearer scheme. Example: \"Authorization: Bearer {token}\"",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "Bearer": [ ]
    }
  ]
}